From b7341cd9689f167b5c04e504cf8b32f6829bf4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 22 May 2023 10:05:28 +0200 Subject: [PATCH 1/2] cache: Use "initrd" as `initrd_type` to build rootfs-initrd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We've been defaulting to "", which would lead to a mismatch with the latest version from the cache, causing a miss, and finally having to build the rootfs-initrd as part of the tests, every single time. Fixes: #6917 Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh | 2 +- 1 file changed, 1 insertion(+), 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 8dbebee42..877576ca6 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -159,7 +159,7 @@ install_image() { #Install guest initrd install_initrd() { - local initrd_type="${1:-""}" + local initrd_type="${1:-"initrd"}" local initrd_suffix="${2:-""}" local jenkins="${jenkins_url}/job/kata-containers-main-rootfs-${initrd_type}-$(uname -m)/${cached_artifacts_path}" local component="rootfs-${initrd_type}" From 22154e0a3b354640a6a1ef976eb5d8379a066955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 22 May 2023 10:09:34 +0200 Subject: [PATCH 2/2] cache: Fix OVMF tarball name for different flavours MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 75330ab3f96f644fff48312e2954ecb1c2fa4081 tried to fix OVMF caching, but didn't consider that the "vanilla" OVMF tarball name is not "kata-static-ovmf-x86_64.tar.xz", but rather "kata-static-ovmf.tar.xz". The fact we missed that, led to the cache builds of OVMF failing, and the need to build the component on every single PR. Fixes: #6917 (hopefully for good this time). Signed-off-by: Fabiano FidĂȘncio --- .../static-build/cache_components_main.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/packaging/static-build/cache_components_main.sh b/tools/packaging/static-build/cache_components_main.sh index 3391cd15e..50b2ba83e 100755 --- a/tools/packaging/static-build/cache_components_main.sh +++ b/tools/packaging/static-build/cache_components_main.sh @@ -77,8 +77,18 @@ cache_nydus_artifacts() { cache_ovmf_artifacts() { local current_ovmf_version="$(get_from_kata_deps "externals.ovmf.${OVMF_FLAVOUR}.version")" - local ovmf_tarball_name="kata-static-ovmf-${OVMF_FLAVOUR}.tar.xz" - [ "${OVMF_FLAVOUR}" == "tdx" ] && ovmf_tarball_name="kata-static-tdvf.tar.xz" + case ${OVMF_FLAVOUR} in + "tdx") + ovmf_tarball_name="kata-static-tdvf.tar.xz" + ;; + "x86_64") + ovmf_tarball_name="kata-static-ovmf.tar.xz" + ;; + *) + ovmf_tarball_name="kata-static-ovmf-${OVMF_FLAVOUR}.tar.xz" + ;; + esac + local current_ovmf_image="$(get_ovmf_image_name)" create_cache_asset "${ovmf_tarball_name}" "${current_ovmf_version}" "${current_ovmf_image}" }