static-build: Add caching support to sev ovmf

SEV requires special OVMF.
Now that we have ability to build this custom OVMF, let's optimize
it by caching so that we don't have to build it for every run.

Fixes: sev: #6572

Signed-Off-By: Unmesh Deodhar <udeodhar@amd.com>
This commit is contained in:
Unmesh Deodhar 2023-04-24 21:13:11 +00:00
parent 76ae7a3abe
commit af18806a8d

View File

@ -59,6 +59,7 @@ cache_nydus_artifacts() {
cache_ovmf_artifacts() {
local current_ovmf_version="$(get_from_kata_deps "externals.ovmf.${OVMF_FLAVOUR}.version")"
[ "${OVMF_FLAVOUR}" == "tdx" ] && OVMF_FLAVOUR="tdvf"
[ "${OVMF_FLAVOUR}" == "sev" ] && OVMF_FLAVOUR="ovmf-sev"
local ovmf_tarball_name="kata-static-${OVMF_FLAVOUR}.tar.xz"
local current_ovmf_image="$(get_ovmf_image_name)"
create_cache_asset "${ovmf_tarball_name}" "${current_ovmf_version}" "${current_ovmf_image}"