From b6a3a3f8fe68b9b7f39611b7b088e196c088efda Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Thu, 8 Aug 2024 14:58:58 +0100 Subject: [PATCH] ci: cache: Include kata version in artefact versions - At the moment we aren't factoring in the kata version on our caches, so it means that when we bump this just before release, we don't rebuilt components that pull in the VERSION content, so the release build ends up with incorrect versions in it's binaries Fixes: #10092 Signed-off-by: stevenhorsman --- .../kata-deploy/local-build/kata-deploy-binaries.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh index c77c2a217..1b8f88009 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -295,7 +295,7 @@ install_image() { "$(get_last_modification "${repo_root_dir}/tools/packaging/static-build/agent")") - latest_artefact="${osbuilder_last_commit}-${guest_image_last_commit}-${agent_last_commit}-${libs_last_commit}-${gperf_version}-${libseccomp_version}-${rust_version}-${image_type}" + latest_artefact="$(get_kata_version)-${osbuilder_last_commit}-${guest_image_last_commit}-${agent_last_commit}-${libs_last_commit}-${gperf_version}-${libseccomp_version}-${rust_version}-${image_type}" if [ "${variant}" == "confidential" ]; then # For the confidential image we depend on the kernel built in order to ensure that # measured boot is used @@ -764,7 +764,7 @@ install_shimv2() { local GO_VERSION="$(get_from_kata_deps ".languages.golang.meta.newest-version")" local RUST_VERSION="$(get_from_kata_deps ".languages.rust.meta.newest-version")" - latest_artefact="${shim_v2_last_commit}-${protocols_last_commit}-${runtime_rs_last_commit}-${GO_VERSION}-${RUST_VERSION}" + latest_artefact="$(get_kata_version)-${shim_v2_last_commit}-${protocols_last_commit}-${runtime_rs_last_commit}-${GO_VERSION}-${RUST_VERSION}" latest_builder_image="$(get_shim_v2_image_name)" install_cached_tarball_component \ @@ -825,7 +825,7 @@ install_busybox() { } install_agent() { - latest_artefact="$(git log -1 --abbrev=9 --pretty=format:"%h" ${repo_root_dir}/src/agent)" + latest_artefact="$(get_kata_version)-$(git log -1 --abbrev=9 --pretty=format:"%h" ${repo_root_dir}/src/agent)" artefact_tag="$(git log -1 --pretty=format:"%H" ${repo_root_dir})" latest_builder_image="$(get_agent_image_name)" @@ -929,7 +929,7 @@ install_script_helper() { install_tools_helper() { tool=${1} - latest_artefact="$(git log -1 --abbrev=9 --pretty=format:"%h" ${repo_root_dir}/src/tools/${tool})" + latest_artefact="$(get_kata_version)-$(git log -1 --abbrev=9 --pretty=format:"%h" ${repo_root_dir}/src/tools/${tool})" latest_builder_image="$(get_tools_image_name)" install_cached_tarball_component \