diff --git a/ci-automation/ci_automation_common.sh b/ci-automation/ci_automation_common.sh index a0745b25ec..2a7408b6d5 100644 --- a/ci-automation/ci_automation_common.sh +++ b/ci-automation/ci_automation_common.sh @@ -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}" diff --git a/ci-automation/garbage_collect.sh b/ci-automation/garbage_collect.sh index 3e0d0a8d58..c36f92fd89 100644 --- a/ci-automation/garbage_collect.sh +++ b/ci-automation/garbage_collect.sh @@ -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 \ diff --git a/ci-automation/image.sh b/ci-automation/image.sh index 0cb5b7e118..4a1608d183 100644 --- a/ci-automation/image.sh +++ b/ci-automation/image.sh @@ -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}")" diff --git a/ci-automation/image_changes.sh b/ci-automation/image_changes.sh index 82d9857c7e..23af10c70d 100644 --- a/ci-automation/image_changes.sh +++ b/ci-automation/image_changes.sh @@ -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 diff --git a/ci-automation/packages-tag.sh b/ci-automation/packages-tag.sh index 053f893546..f8acbc511b 100644 --- a/ci-automation/packages-tag.sh +++ b/ci-automation/packages-tag.sh @@ -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 diff --git a/ci-automation/packages.sh b/ci-automation/packages.sh index e6e984f7f3..4ef2538aa2 100644 --- a/ci-automation/packages.sh +++ b/ci-automation/packages.sh @@ -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}" diff --git a/ci-automation/push_pkgs.sh b/ci-automation/push_pkgs.sh index 0cb1a0187c..1d4d31259b 100644 --- a/ci-automation/push_pkgs.sh +++ b/ci-automation/push_pkgs.sh @@ -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}")" diff --git a/ci-automation/release.sh b/ci-automation/release.sh index 90fb1c59db..bff9ae6f72 100644 --- a/ci-automation/release.sh +++ b/ci-automation/release.sh @@ -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 diff --git a/ci-automation/sdk_bootstrap.sh b/ci-automation/sdk_bootstrap.sh index 3540ec9023..d3ea8d1691 100644 --- a/ci-automation/sdk_bootstrap.sh +++ b/ci-automation/sdk_bootstrap.sh @@ -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 diff --git a/ci-automation/sdk_container.sh b/ci-automation/sdk_container.sh index e387558191..57be39febd 100644 --- a/ci-automation/sdk_container.sh +++ b/ci-automation/sdk_container.sh @@ -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" diff --git a/ci-automation/test.sh b/ci-automation/test.sh index bdddb4a3b4..7026b2f736 100644 --- a/ci-automation/test.sh +++ b/ci-automation/test.sh @@ -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" diff --git a/ci-automation/util/fetch_image.sh b/ci-automation/util/fetch_image.sh index 51c4ef3a42..5b65e13256 100755 --- a/ci-automation/util/fetch_image.sh +++ b/ci-automation/util/fetch_image.sh @@ -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}")" diff --git a/ci-automation/vms.sh b/ci-automation/vms.sh index 69f8fd5462..720689453d 100644 --- a/ci-automation/vms.sh +++ b/ci-automation/vms.sh @@ -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}")"