From 471e23cb12860fd6edf6a939c5b16784fc48aee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 25 Jul 2023 11:36:49 +0200 Subject: [PATCH] cc: kernel-tdx: Ensure we try the cache for the specific CC version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we'd have to build the component every single time as the main version is different from the CC one. Fixes: #7422 Signed-off-by: Fabiano FidĂȘncio --- .../kata-deploy/local-build/kata-deploy-binaries.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 92041363f5..17171e5a2e 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -439,9 +439,16 @@ install_cached_kernel_tarball_component() { local kernel_name=${1} local module_dir=${2:-""} + # This must only be done as part of the CCv0 branch, as TDX version of + # Kernel is not the same as the one used on main + local url="${jenkins_url}/job/kata-containers-main-${kernel_name}-$(uname -m)/${cached_artifacts_path}" + if [[ "${kernel_name}" == "kernel-tdx-experimental" ]]; then + url="${jenkins_url}/job/kata-containers-2.0-kernel-tdx-cc-$(uname -m)/${cached_artifacts_path}" + fi + install_cached_tarball_component \ "${kernel_name}" \ - "${jenkins_url}/job/kata-containers-main-${kernel_name}-$(uname -m)/${cached_artifacts_path}" \ + "${url}" \ "${kernel_version}-${kernel_kata_config_version}" \ "$(get_kernel_image_name)" \ "${final_tarball_name}" \