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] 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 3391cd15ed..50b2ba83e5 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}" }