mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 18:12:08 +02:00
Merge pull request #2136 from flatcar-linux/dongsu/github-actions-sdk-container
.github: migrate to SDK container based Github Actions
This commit is contained in:
commit
7a141568a0
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -32,6 +32,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/cacerts-apply-patch.sh
|
run: .github/workflows/cacerts-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -32,6 +32,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/cacerts-apply-patch.sh
|
run: .github/workflows/cacerts-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -30,6 +30,9 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
CHECKOUT_SCRIPTS: "false"
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/cacerts-apply-patch.sh
|
run: .github/workflows/cacerts-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -32,6 +32,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/cacerts-apply-patch.sh
|
run: .github/workflows/cacerts-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -29,6 +29,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/cacerts-apply-patch.sh
|
run: .github/workflows/cacerts-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -32,6 +32,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/cacerts-apply-patch.sh
|
run: .github/workflows/cacerts-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -2,14 +2,18 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
readonly SDK_OUTER_TOPDIR="${HOME}/flatcar-sdk"
|
readonly SDK_OUTER_TOPSCRIPTSDIR="${HOME}/flatcar-sdk/scripts"
|
||||||
|
readonly SDK_OUTER_TOPDIR="${SDK_OUTER_TOPSCRIPTSDIR}/sdk_container"
|
||||||
readonly SDK_OUTER_SRCDIR="${SDK_OUTER_TOPDIR}/src"
|
readonly SDK_OUTER_SRCDIR="${SDK_OUTER_TOPDIR}/src"
|
||||||
readonly SDK_INNER_SRCDIR="/mnt/host/source/src"
|
readonly SDK_INNER_SRCDIR="/mnt/host/source/src"
|
||||||
|
|
||||||
readonly BUILDBOT_USERNAME="Flatcar Buildbot"
|
readonly BUILDBOT_USERNAME="Flatcar Buildbot"
|
||||||
readonly BUILDBOT_USEREMAIL="buildbot@flatcar-linux.org"
|
readonly BUILDBOT_USEREMAIL="buildbot@flatcar-linux.org"
|
||||||
|
|
||||||
function enter() ( cd ../../..; exec cork enter -- $@ )
|
function enter() {
|
||||||
|
${SDK_OUTER_TOPSCRIPTSDIR}/run_sdk_container -n "${PACKAGES_CONTAINER}" \
|
||||||
|
-C "${SDK_NAME}" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
# Return a valid ebuild file name for ebuilds of the given category name,
|
# Return a valid ebuild file name for ebuilds of the given category name,
|
||||||
# package name, and the old version. If the single ebuild file already exists,
|
# package name, and the old version. If the single ebuild file already exists,
|
||||||
@ -32,36 +36,48 @@ function get_ebuild_filename() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function prepare_git_repo() {
|
function prepare_git_repo() {
|
||||||
local our_remote_url
|
# the original coreos-overlay repo outside the SDK container
|
||||||
|
|
||||||
git config user.name "${BUILDBOT_USERNAME}"
|
git config user.name "${BUILDBOT_USERNAME}"
|
||||||
git config user.email "${BUILDBOT_USEREMAIL}"
|
git config user.email "${BUILDBOT_USEREMAIL}"
|
||||||
git reset --hard HEAD
|
git reset --hard HEAD
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git checkout -B "${BASE_BRANCH}" "origin/${BASE_BRANCH}"
|
|
||||||
our_remote_url=$(git remote get-url origin)
|
|
||||||
|
|
||||||
# setup overlay repo inside SDK too (be fork friendly)
|
git checkout -B "${BASE_BRANCH}" "origin/${BASE_BRANCH}"
|
||||||
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" remote add our_remote "${our_remote_url}"
|
|
||||||
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" fetch our_remote
|
# inside the SDK container
|
||||||
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" checkout -B "${BASE_BRANCH}" "our_remote/${BASE_BRANCH}"
|
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" config \
|
||||||
|
user.name "${BUILDBOT_USERNAME}"
|
||||||
|
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" config \
|
||||||
|
user.email "${BUILDBOT_USEREMAIL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# caller needs to set pass a parameter as a branch name to be created.
|
# caller needs to set pass a parameter as a branch name to be created.
|
||||||
function checkout_branches() {
|
function checkout_branches() {
|
||||||
TARGET_BRANCH=$1
|
TARGET_BRANCH=$1
|
||||||
|
CHECKOUT_SCRIPTS=$2
|
||||||
|
|
||||||
[[ -z "${TARGET_BRANCH}" ]] && echo "No target branch specified. exit." && return 1
|
[[ -z "${TARGET_BRANCH}" ]] && echo "No target branch specified. exit." && return 1
|
||||||
|
|
||||||
git -C "${SDK_OUTER_SRCDIR}/scripts" checkout -B "${BASE_BRANCH}" "github/${BASE_BRANCH}"
|
# Check out the scripts repo only if CHECKOUT_SCRIPTS == true, due to
|
||||||
git -C "${SDK_OUTER_SRCDIR}/third_party/portage-stable" checkout -B "${BASE_BRANCH}" "github/${BASE_BRANCH}"
|
# a corner case of its LTS-2021 branch does not have run_sdk_container.
|
||||||
|
if [[ "${CHECKOUT_SCRIPTS}" = true ]]; then
|
||||||
if git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" show-ref "remotes/our_remote/${TARGET_BRANCH}"; then
|
git -C "${SDK_OUTER_TOPSCRIPTSDIR}" checkout -B "${BASE_BRANCH}" \
|
||||||
echo "Target branch already exists. exit.";
|
"origin/${BASE_BRANCH}"
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" checkout -B "${TARGET_BRANCH}" "our_remote/${BASE_BRANCH}"
|
# update submodules like portage-stable under the scripts directories
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
if git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" show-ref "remotes/origin/${TARGET_BRANCH}"; then
|
||||||
|
echo "Target branch already exists. exit.";
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Each submodule directory should be explicitly set from BASE_BRANCH,
|
||||||
|
# as the submodule refs could be only updated during the night.
|
||||||
|
git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" checkout \
|
||||||
|
-B "${TARGET_BRANCH}" "origin/${BASE_BRANCH}"
|
||||||
|
git -C "${SDK_OUTER_SRCDIR}/third_party/portage-stable" checkout \
|
||||||
|
-B "${TARGET_BRANCH}" "origin/${BASE_BRANCH}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function regenerate_manifest() {
|
function regenerate_manifest() {
|
||||||
@ -115,7 +131,8 @@ function generate_patches() {
|
|||||||
|
|
||||||
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
pushd "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" >/dev/null || exit
|
||||||
|
|
||||||
enter ebuild "${SDK_INNER_SRCDIR}/third_party/coreos-overlay/${CATEGORY_NAME}/${PKGNAME_SIMPLE}/${PKGNAME_SIMPLE}-${VERSION_NEW}.ebuild" manifest --force
|
enter ebuild "${SDK_INNER_SRCDIR}/third_party/coreos-overlay/${CATEGORY_NAME}/${PKGNAME_SIMPLE}/${PKGNAME_SIMPLE}-${VERSION_NEW}.ebuild" \
|
||||||
|
manifest --force
|
||||||
|
|
||||||
# We can only create the actual commit in the actual source directory, not under the SDK.
|
# We can only create the actual commit in the actual source directory, not under the SDK.
|
||||||
# So create a format-patch, and apply to the actual source.
|
# So create a format-patch, and apply to the actual source.
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "containerd-${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -32,6 +32,8 @@ jobs:
|
|||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
COMMIT_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_MAIN }}
|
COMMIT_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/containerd-apply-patch.sh
|
run: .github/workflows/containerd-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "docker-${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "docker-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -36,6 +36,8 @@ jobs:
|
|||||||
COMMIT_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_MAIN }}
|
COMMIT_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_MAIN }}
|
||||||
COMMIT_CLI_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_CLI }}
|
COMMIT_CLI_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_CLI }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/docker-apply-patch.sh
|
run: .github/workflows/docker-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -29,6 +29,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/firmware-apply-patch.sh
|
run: .github/workflows/firmware-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -19,13 +19,15 @@ for version_new in ${VERSIONS_NEW}; do
|
|||||||
VERSIONS["${version_new_trimmed}"]="${version_new}"
|
VERSIONS["${version_new_trimmed}"]="${version_new}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
branch_name="go-$(join_by '-and-' ${VERSIONS_NEW})-${TARGET}"
|
branch_name="go-$(join_by '-and-' ${VERSIONS_NEW})-${TARGET}"
|
||||||
|
|
||||||
if ! checkout_branches "${branch_name}"; then
|
if ! checkout_branches "${branch_name}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-releases.outputs.BASE_BRANCH_MAIN }}
|
BASE_BRANCH: ${{ steps.fetch-latest-releases.outputs.BASE_BRANCH_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSIONS_NEW: ${{ steps.fetch-latest-releases.outputs.VERSIONS_MAIN }}
|
VERSIONS_NEW: ${{ steps.fetch-latest-releases.outputs.VERSIONS_MAIN }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/go-apply-patch.sh
|
run: .github/workflows/go-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -5,12 +5,13 @@ set -euo pipefail
|
|||||||
# trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4
|
# trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4
|
||||||
VERSION_SHORT=${VERSION_NEW%.*}
|
VERSION_SHORT=${VERSION_NEW%.*}
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "linux-${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "linux-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -33,6 +33,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/kernel-apply-patch.sh
|
run: .github/workflows/kernel-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -33,6 +33,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/kernel-apply-patch.sh
|
run: .github/workflows/kernel-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -33,6 +33,9 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
CHECKOUT_SCRIPTS: "false"
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/kernel-apply-patch.sh
|
run: .github/workflows/kernel-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -33,6 +33,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/kernel-apply-patch.sh
|
run: .github/workflows/kernel-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -31,6 +31,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/kernel-apply-patch.sh
|
run: .github/workflows/kernel-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -33,6 +33,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAINTENANCE }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAINTENANCE }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/kernel-apply-patch.sh
|
run: .github/workflows/kernel-apply-patch.sh
|
||||||
- name: Create pull request for maintenance branch
|
- name: Create pull request for maintenance branch
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "runc-${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "runc-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -36,6 +36,8 @@ jobs:
|
|||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
COMMIT_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_MAIN }}
|
COMMIT_HASH: ${{ steps.fetch-latest-release.outputs.COMMIT_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/runc-apply-patch.sh
|
run: .github/workflows/runc-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "rust-${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "rust-${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -29,6 +29,8 @@ jobs:
|
|||||||
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
BASE_BRANCH: ${{ steps.fetch-latest-release.outputs.BASE_BRANCH_MAIN }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/rust-apply-patch.sh
|
run: .github/workflows/rust-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
id: create-pull-request
|
id: create-pull-request
|
||||||
|
@ -2,62 +2,51 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
sudo apt-get install -y lbzip2
|
sudo ln -sfn /bin/bash /bin/sh
|
||||||
|
sudo apt-get install -y ca-certificates curl git gnupg lbzip2 lsb-release \
|
||||||
|
qemu-user-static
|
||||||
|
sudo mkdir -p /etc/apt/keyrings
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
|
||||||
|
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
|
||||||
|
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||||
|
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y docker-ce docker-ce-cli containerd.io \
|
||||||
|
docker-compose-plugin
|
||||||
|
|
||||||
CORK_VERSION=$(curl -sL https://api.github.com/repos/kinvolk/mantle/releases/latest | jq -r .tag_name | sed -e 's/^v//')
|
|
||||||
curl -L -o cork https://github.com/kinvolk/mantle/releases/download/v"${CORK_VERSION}"/cork-"${CORK_VERSION}"-amd64
|
|
||||||
curl -L -o cork.sig https://github.com/kinvolk/mantle/releases/download/v"${CORK_VERSION}"/cork-"${CORK_VERSION}"-amd64.sig
|
|
||||||
curl -LO https://kinvolk.io/flatcar-container-linux/security/image-signing-key/Flatcar_Image_Signing_Key.asc
|
|
||||||
gpg --import Flatcar_Image_Signing_Key.asc
|
|
||||||
gpg --verify cork.sig cork
|
|
||||||
rm -f cork.sig Flatcar_Image_Signing_Key.asc
|
|
||||||
chmod +x cork
|
|
||||||
mkdir -p ~/.local/bin
|
|
||||||
mv cork ~/.local/bin
|
|
||||||
|
|
||||||
export PATH=$PATH:$HOME/.local/bin
|
|
||||||
mkdir -p ~/flatcar-sdk
|
mkdir -p ~/flatcar-sdk
|
||||||
|
git -C ~/flatcar-sdk clone https://github.com/flatcar-linux/scripts
|
||||||
|
|
||||||
pushd ~/flatcar-sdk || exit
|
pushd ~/flatcar-sdk/scripts || exit
|
||||||
cork create || true
|
|
||||||
|
|
||||||
sudo tee "./chroot/etc/portage/make.conf" <<EOF
|
source ci-automation/ci_automation_common.sh
|
||||||
PORTDIR="/mnt/host/source/src/third_party/portage-stable"
|
source sdk_container/.repo/manifests/version.txt
|
||||||
PORTDIR_OVERLAY="/mnt/host/source/src/third_party/coreos-overlay"
|
|
||||||
DISTDIR="/mnt/host/source/.cache/distfiles"
|
|
||||||
PKGDIR="/var/lib/portage/pkgs"
|
|
||||||
PORT_LOGDIR="/var/log/portage"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sudo tee "./chroot/etc/portage/repos.conf/coreos.conf" <<EOF
|
git submodule update --init --recursive
|
||||||
[DEFAULT]
|
|
||||||
main-repo = portage-stable
|
|
||||||
|
|
||||||
[gentoo]
|
arch="amd64"
|
||||||
disabled = true
|
channel_version="alpha-${FLATCAR_VERSION_ID}"
|
||||||
|
check_version_string "${channel_version}"
|
||||||
|
|
||||||
[coreos]
|
export SDK_NAME="flatcar-sdk-${arch}"
|
||||||
location = /mnt/host/source/src/third_party/coreos-overlay
|
|
||||||
|
|
||||||
[portage-stable]
|
# Pin the docker image version to that of the latest release.
|
||||||
location = /mnt/host/source/src/third_party/portage-stable
|
docker_sdk_vernum="$(curl -s -S -f -L \
|
||||||
EOF
|
https://alpha.release.flatcar-linux.net/amd64-usr/current/version.txt \
|
||||||
|
| grep -m 1 FLATCAR_SDK_VERSION= | cut -d = -f 2- \
|
||||||
|
)"
|
||||||
|
|
||||||
# /var under the chroot has to be writable by the runner user
|
docker_image_from_registry_or_buildcache "${SDK_NAME}" "${docker_sdk_vernum}"
|
||||||
sudo chown -R runner:docker ~/flatcar-sdk/chroot/var
|
export SDK_NAME="$(docker_image_fullname "${SDK_NAME}" "${docker_sdk_vernum}")"
|
||||||
|
|
||||||
function enter() ( exec cork enter -- $@ )
|
vernum="${channel_version#*-}" # remove main-,alpha-,beta-,stable-,lts- version tag
|
||||||
|
docker_vernum="$(vernum_to_docker_image_version "${vernum}")"
|
||||||
|
export PACKAGES_CONTAINER="flatcar-packages-${arch}-${docker_vernum}"
|
||||||
|
|
||||||
# To be able to generate metadata, we need to configure a profile
|
|
||||||
# /etc/portage/make.profile, a symlink pointing to the SDK profile.
|
|
||||||
enter sudo eselect profile set --force "coreos:coreos/amd64/sdk"
|
|
||||||
|
|
||||||
# make edb directory group-writable to run egencache
|
|
||||||
enter sudo chmod g+w /var/cache/edb
|
|
||||||
|
|
||||||
git -C src/third_party/coreos-overlay reset --hard github/main
|
|
||||||
git -C src/third_party/coreos-overlay config user.name 'Flatcar Buildbot'
|
|
||||||
git -C src/third_party/coreos-overlay config user.email 'buildbot@flatcar-linux.org'
|
|
||||||
popd || exit
|
popd || exit
|
||||||
|
|
||||||
echo ::set-output name=path::"${PATH}"
|
echo ::set-output name=path::"${PATH}"
|
||||||
|
echo ::set-output name=PACKAGES_CONTAINER::"${PACKAGES_CONTAINER}"
|
||||||
|
echo ::set-output name=SDK_NAME::"${SDK_NAME}"
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
UPDATE_NEEDED=1
|
UPDATE_NEEDED=1
|
||||||
|
CHECKOUT_SCRIPTS="${CHECKOUT_SCRIPTS:-true}"
|
||||||
|
|
||||||
. .github/workflows/common.sh
|
. .github/workflows/common.sh
|
||||||
|
|
||||||
prepare_git_repo
|
prepare_git_repo
|
||||||
|
|
||||||
if ! checkout_branches "${VERSION_NEW}-${TARGET}"; then
|
if ! checkout_branches "${VERSION_NEW}-${TARGET}" "${CHECKOUT_SCRIPTS}"; then
|
||||||
UPDATE_NEEDED=0
|
UPDATE_NEEDED=0
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -32,6 +32,8 @@ jobs:
|
|||||||
BUILD_NUMBER: ${{ steps.fetch-latest-release.outputs.BUILD_NUMBER }}
|
BUILD_NUMBER: ${{ steps.fetch-latest-release.outputs.BUILD_NUMBER }}
|
||||||
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
PATH: ${{ steps.setup-flatcar-sdk.outputs.path }}
|
||||||
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
VERSION_NEW: ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}
|
||||||
|
PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }}
|
||||||
|
SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }}
|
||||||
run: .github/workflows/vmware-apply-patch.sh
|
run: .github/workflows/vmware-apply-patch.sh
|
||||||
- name: Create pull request for main
|
- name: Create pull request for main
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user