ci-automation: Use new manifests location

This commit is contained in:
Krzesimir Nowak 2023-10-24 17:39:12 +02:00
parent 051e5e980a
commit 2074fcd62f
13 changed files with 36 additions and 31 deletions

View File

@ -34,7 +34,7 @@ function update_and_push_version() {
fi
# Add and commit local changes
git add "sdk_container/.repo/manifests/version.txt"
git add "manifests/version.txt"
git commit --allow-empty -m "New version: ${version}"

View File

@ -82,8 +82,13 @@ function _garbage_collect_impl() {
echo "#### Processing version '${version}' ####"
echo
git checkout "${version}" -- sdk_container/.repo/manifests/version.txt
source sdk_container/.repo/manifests/version.txt
vertxt=manifests/version.txt
if ! git checkout "${version}" -- "${vertxt}"; then
echo 'Trying to check out the old location of the version.txt then.'
vertxt=sdk_container/.repo/manifests/version.txt
git checkout "${version}" -- "${vertxt}"
fi
source "${vertxt}"
# Assuming that the SDK build version also has the same OS version
local os_vernum="${FLATCAR_VERSION}"
@ -151,7 +156,7 @@ function _garbage_collect_impl() {
echo
local mantle_ref
mantle_ref=$(cat sdk_container/.repo/manifests/mantle-container)
mantle_ref=$(cat manifests/mantle-container)
docker run --pull always --rm --net host \
--env AZURE_AUTH_CREDENTIALS --env AZURE_PROFILE \
--env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY \

View File

@ -13,7 +13,7 @@
#
# PREREQUISITES:
#
# 1. SDK version and OS image version are recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version and OS image version are recorded in manifests/version.txt
# 2. Scripts repo version tag of OS image version to be built is available and checked out.
# 3. Flatcar packages container is available via build cache server
# from "/containers/[VERSION]/flatcar-packages-[ARCH]-[FLATCAR_VERSION].tar.gz"
@ -63,7 +63,7 @@ function _image_build_impl() {
source ci-automation/ci_automation_common.sh
source ci-automation/gpg_setup.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local vernum="${FLATCAR_VERSION}"
local docker_vernum="$(vernum_to_docker_image_version "${vernum}")"

View File

@ -40,7 +40,7 @@ function image_changes() (
if [ "${channel}" = "developer" ]; then
channel="alpha"
fi
vernum=$(source sdk_container/.repo/manifests/version.txt; echo "${FLATCAR_VERSION}")
vernum=$(source manifests/version.txt; echo "${FLATCAR_VERSION}")
local -a package_diff_env package_diff_params_b
local -a size_changes_env size_changes_params_b

View File

@ -14,7 +14,7 @@
#
# PREREQUISITES:
#
# 1. SDK version is recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version is recorded in manifests/version.txt
# 2. SDK container is either
# - available via ghcr.io/flatcar/flatcar-sdk-[ARCH]:[VERSION] (official SDK release)
# OR
@ -41,7 +41,7 @@
#
# 1. Updated scripts repository
# - version tag
# - sdk_container/.repo/manifests/version.txt denotes new FLATCAR OS version
# - manifests/version.txt denotes new FLATCAR OS version
# 2. "./skip-build" as flag file to signal that the build should stop
function packages_tag() {
@ -63,7 +63,7 @@ function _packages_tag_impl() {
check_version_string "${version}"
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local sdk_version="${FLATCAR_SDK_VERSION}"
# Create new tag in scripts repo w/ updated versionfile

View File

@ -13,7 +13,7 @@
#
# PREREQUISITES:
#
# 1. SDK version and OS image version are recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version and OS image version are recorded in manifests/version.txt
# 2. Scripts repo version tag of OS image version to be built is available and checked out.
# 3. SDK container is either
# - available via ghcr.io/flatcar/flatcar-sdk-[ARCH]:[VERSION] (official SDK release)
@ -64,7 +64,7 @@ function _packages_build_impl() {
source ci-automation/ci_automation_common.sh
source ci-automation/gpg_setup.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local sdk_version="${FLATCAR_SDK_VERSION}"
# Get SDK from either the registry or import from build cache
@ -90,7 +90,7 @@ function _packages_build_impl() {
./build_packages --board="${arch}-usr"
# run_sdk_container updates the version file, use that version from here on
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local vernum="${FLATCAR_VERSION}"
local docker_vernum="$(vernum_to_docker_image_version "${vernum}")"
local packages_image="flatcar-packages-${arch}"

View File

@ -15,7 +15,7 @@
#
# PREREQUISITES:
#
# 1. SDK version and OS image version are recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version and OS image version are recorded in manifests/version.txt
# 2. Scripts repo version tag of OS image version to be built is available and checked out.
# 3. Flatcar packages container is available via build cache server
# from "/containers/[VERSION]/flatcar-packages-[ARCH]-[FLATCAR_VERSION].tar.gz"
@ -79,7 +79,7 @@ function _push_packages_impl() {
source ci-automation/ci_automation_common.sh
source ci-automation/gpg_setup.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local vernum="${FLATCAR_VERSION}"
local docker_vernum="$(vernum_to_docker_image_version "${vernum}")"

View File

@ -13,9 +13,9 @@
#
# PREREQUISITES:
#
# 1. SDK version and OS image version are recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version and OS image version are recorded in manifests/version.txt
# 2. Scripts repo version tag of OS image version to be built is available and checked out.
# 3. Mantle container docker image reference is stored in sdk_container/.repo/manifests/mantle-container.
# 3. Mantle container docker image reference is stored in manifests/mantle-container.
# 4. Vendor image to run tests for are available on buildcache
# ( images/[ARCH]/[FLATCAR_VERSION]/ )
# 5. SDK container is either
@ -74,7 +74,7 @@ function _inside_mantle() {
source sdk_lib/sdk_container_common.sh
source ci-automation/ci_automation_common.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
# Needed because we are not the SDK container here
source sdk_container/.env
CHANNEL="$(get_git_channel)"
@ -189,7 +189,7 @@ function _release_build_impl() {
source ci-automation/ci_automation_common.sh
source ci-automation/gpg_setup.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
# Needed because we are not the SDK container here
source sdk_container/.env
local sdk_version="${FLATCAR_SDK_VERSION}"
@ -201,7 +201,7 @@ function _release_build_impl() {
local container_name="flatcar-publish-${docker_vernum}"
local mantle_ref
mantle_ref=$(cat sdk_container/.repo/manifests/mantle-container)
mantle_ref=$(cat manifests/mantle-container)
# A job on each worker prunes old mantle images (docker image prune), no need to do it here
echo "docker rm -f '${container_name}'" >> ./ci-cleanup.sh

View File

@ -47,7 +47,7 @@
# 1. SDK tarball (gentoo catalyst output) of the new SDK, pushed to buildcache.
# 2. Updated scripts repository
# - version tag
# - sdk_container/.repo/manifests/version.txt denotes new SDK version
# - manifests/version.txt denotes new SDK version
# 3. "./ci-cleanup.sh" with commands to clean up temporary build resources,
# to be run after this step finishes / when this step is aborted.
# 4. If signer key was passed, signatures of artifacts from point 1, pushed along to buildcache.
@ -147,7 +147,7 @@ function _sdk_bootstrap_impl() {
# push SDK tarball to buildcache
# Get Flatcar version number format (separator is '+' instead of '-',
# equal to $(strip_version_prefix "$version")
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local dest_tarball="flatcar-sdk-${ARCH}-${FLATCAR_SDK_VERSION}.tar.bz2"
# change the owner of the files and directories in __build__ back

View File

@ -15,7 +15,7 @@
#
# PREREQUISITES:
#
# 1. SDK version is recorded in sdk_container/.repo/manifests/version.txt and a matching
# 1. SDK version is recorded in manifests/version.txt and a matching
# SDK tarball is available on BUILDCACHE/sdk/[ARCH]/[VERSION]/flatcar-sdk-[ARCH]-[VERSION].tar.bz2
#
# OPTIONAL INPUT:
@ -56,7 +56,7 @@ function _sdk_container_build_impl() {
source ci-automation/ci_automation_common.sh
source ci-automation/gpg_setup.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local vernum="${FLATCAR_SDK_VERSION}"
local sdk_tarball="flatcar-sdk-${ARCH}-${vernum}.tar.bz2"

View File

@ -16,9 +16,9 @@
#
# PREREQUISITES:
#
# 1. SDK version and OS image version are recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version and OS image version are recorded in manifests/version.txt
# 2. Scripts repo version tag of OS image version to be built is available and checked out.
# 3. Mantle container docker image reference is stored in sdk_container/.repo/manifests/mantle-container.
# 3. Mantle container docker image reference is stored in manifests/mantle-container.
# 4. Vendor image to run tests for are available on buildcache
# ( images/[ARCH]/[FLATCAR_VERSION]/ )
#
@ -112,7 +112,7 @@ function _test_run_impl() {
source ci-automation/ci_automation_common.sh
source sdk_lib/sdk_container_common.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local vernum="${FLATCAR_VERSION}"
local docker_vernum
docker_vernum="$(vernum_to_docker_image_version "${vernum}")"
@ -130,7 +130,7 @@ function _test_run_impl() {
local container_name="flatcar-tests-${arch}-${docker_vernum}-${image}"
local mantle_ref
mantle_ref=$(cat sdk_container/.repo/manifests/mantle-container)
mantle_ref=$(cat manifests/mantle-container)
local tap_merged_summary="results-${image}"
local tap_merged_detailed="results-${image}-detailed"

View File

@ -30,7 +30,7 @@ function fetch_image() {
local script_root="$(dirname "${BASH_SOURCE[0]}")/../.."
source "${script_root}/ci-automation/ci_automation_common.sh"
local vernum="$(source "${script_root}/sdk_container/.repo/manifests/version.txt";
local vernum="$(source "${script_root}/manifests/version.txt";
echo "${FLATCAR_VERSION}")"
local docker_vernum="$(vernum_to_docker_image_version "${vernum}")"

View File

@ -13,7 +13,7 @@
#
# PREREQUISITES:
#
# 1. SDK version and OS image version are recorded in sdk_container/.repo/manifests/version.txt
# 1. SDK version and OS image version are recorded in manifests/version.txt
# 2. Scripts repo version tag of OS image version to be built is available and checked out.
# 3. Flatcar packages container is available via build cache server
# from "/containers/[VERSION]/flatcar-images-[ARCH]-[FLATCAR_VERSION].tar.gz"
@ -65,7 +65,7 @@ function _vm_build_impl() {
source ci-automation/ci_automation_common.sh
source ci-automation/gpg_setup.sh
source sdk_container/.repo/manifests/version.txt
source manifests/version.txt
local vernum="${FLATCAR_VERSION}"
local docker_vernum="$(vernum_to_docker_image_version "${vernum}")"