From 0749022f8c293c427551b4d44b9f236e7a460945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 25 Jul 2023 10:19:36 +0200 Subject: [PATCH 1/4] cc: clh: 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. 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 61014578d4..7fdea96bcc 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -661,9 +661,16 @@ install_clh_helper() { features="${2}" suffix="${3:-""}" + # This must only be done as part of the CCv0 branch, as TDX version of + # CLH is not the same as the one used on main + local url="${jenkins_url}/job/kata-containers-main-clh-$(uname -m)${suffix}/${cached_artifacts_path}" + if [[ "${features}" =~ "tdx" ]]; then + local url="${jenkins_url}/job/kata-containers-2.0-clh-cc-$(uname -m)${suffix}/${cached_artifacts_path}" + fi + install_cached_tarball_component \ "cloud-hypervisor${suffix}" \ - "${jenkins_url}/job/kata-containers-main-clh-$(uname -m)${suffix}/${cached_artifacts_path}" \ + "${url}" \ "$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.version")" \ "" \ "${final_tarball_name}" \ From d03685004ef2e9260d805a43c53bbd00187939ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 25 Jul 2023 10:23:03 +0200 Subject: [PATCH 2/4] cc: tdvf: 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. Signed-off-by: Fabiano Fidêncio --- .../kata-deploy/local-build/kata-deploy-binaries.sh | 13 ++++++++++++- 1 file changed, 12 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 7fdea96bcc..847785fa51 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -788,9 +788,20 @@ install_ovmf() { local component_name="ovmf" local component_version="$(get_from_kata_deps "externals.ovmf.${ovmf_type}.version")" [ "${ovmf_type}" == "tdx" ] && component_name="tdvf" + + # I am not expanding the if above just to make it easier for us in the + # future to deal with the rebases + # + # This must only be done as part of the CCv0 branch, as the version of + # TDVF is not the same as the one used on main + local url="${jenkins_url}/job/kata-containers-main-ovmf-${ovmf_type}-$(uname -m)/${cached_artifacts_path}" + if [[ "${ovmf_type}" == "tdx" ]]; then + url="${jenkins_url}/job/kata-containers-2.0-tdvf-cc-$(uname -m)/${cached_artifacts_path}" + fi + install_cached_tarball_component \ "${component_name}" \ - "${jenkins_url}/job/kata-containers-main-ovmf-${ovmf_type}-$(uname -m)/${cached_artifacts_path}" \ + "${url}" \ "${component_version}" \ "$(get_ovmf_image_name)" \ "${final_tarball_name}" \ From 3f309fad0127bb9eb024d439fdbfb30bcd85bc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 25 Jul 2023 11:31:42 +0200 Subject: [PATCH 3/4] cc: qemu-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. 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 847785fa51..92041363f5 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -590,9 +590,16 @@ install_qemu_helper() { export qemu_repo="$(get_from_kata_deps ${qemu_repo_yaml_path})" export qemu_version="$(get_from_kata_deps ${qemu_version_yaml_path})" + # This must only be done as part of the CCv0 branch, as TDX version of + # QEMU is not the same as the one used on main + local url="${jenkins_url}/job/kata-containers-main-${qemu_name}-$(uname -m)/${cached_artifacts_path}" + if [[ "${qemu_name}" == "qemu-tdx-experimental" ]]; then + url="${jenkins_url}/job/kata-containers-2.0-qemu-tdx-cc-$(uname -m)/${cached_artifacts_path}" + fi + install_cached_tarball_component \ "${qemu_name}" \ - "${jenkins_url}/job/kata-containers-main-${qemu_name}-$(uname -m)/${cached_artifacts_path}" \ + "${url}" \ "${qemu_version}-$(calc_qemu_files_sha256sum)" \ "$(get_qemu_image_name)" \ "${final_tarball_name}" \ 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 4/4] 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}" \