mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
cache: Add ability to cache OVMF
Let's add the ability to cache OVMF, which right now we're only building and shipping it for TDX. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
ce8d982512
commit
9feec533ce
@ -13,6 +13,7 @@ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "${script_dir}/../scripts/lib.sh"
|
||||
|
||||
KERNEL_FLAVOUR="${KERNEL_FLAVOUR:-kernel}" # kernel | kernel-experimental | kernel-arm-experimental | kernel-dragonball-experimental | kernel-tdx-experimental
|
||||
OVMF_FLAVOUR="${OVMF_FLAVOUR:-x86_64}" # x86_64 | tdx
|
||||
QEMU_FLAVOUR="${QEMU_FLAVOUR:-qemu}" # qemu | qemu-tdx-experimental
|
||||
ROOTFS_IMAGE_TYPE="${ROOTFS_IMAGE_TYPE:-image}" # image | initrd
|
||||
|
||||
@ -42,6 +43,13 @@ cache_nydus_artifacts() {
|
||||
create_cache_asset "${nydus_tarball_name}" "${current_nydus_version}" ""
|
||||
}
|
||||
|
||||
cache_ovmf_artifacts() {
|
||||
local ovmf_tarball_name="kata-static-${OVMF_FLAVOUR}.tar.xz"
|
||||
local current_ovmf_version="$(get_from_kata_deps "externals.ovmf.${OVMF_FLAVOUR}.version")"
|
||||
local current_ovmf_image="$(get_ovmf_image_name)"
|
||||
create_cache_asset "${ovmf_tarball_name}" "${current_ovmf_version}" "${current_ovmf_image}"
|
||||
}
|
||||
|
||||
cache_qemu_artifacts() {
|
||||
local qemu_tarball_name="kata-static-${QEMU_FLAVOUR}.tar.xz"
|
||||
local current_qemu_version=$(get_from_kata_deps "assets.hypervisor.${QEMU_FLAVOUR}.version")
|
||||
@ -127,12 +135,13 @@ main() {
|
||||
local firecracker_component="${firecracker_component:-}"
|
||||
local kernel_component="${kernel_component:-}"
|
||||
local nydus_component="${nydus_component:-}"
|
||||
local ovmf_component="${ovmf_component:-}"
|
||||
local qemu_component="${qemu_component:-}"
|
||||
local rootfs_component="${rootfs_component:-}"
|
||||
local shim_v2_component="${shim_v2_component:-}"
|
||||
local virtiofsd_component="${virtiofsd_component:-}"
|
||||
local OPTIND
|
||||
while getopts ":cFknqrsvh:" opt
|
||||
while getopts ":cFknoqrsvh:" opt
|
||||
do
|
||||
case "$opt" in
|
||||
c)
|
||||
@ -147,6 +156,9 @@ main() {
|
||||
n)
|
||||
nydus_component="1"
|
||||
;;
|
||||
o)
|
||||
ovmf_component="1"
|
||||
;;
|
||||
q)
|
||||
qemu_component="1"
|
||||
;;
|
||||
@ -176,6 +188,7 @@ main() {
|
||||
[[ -z "${firecracker_component}" ]] && \
|
||||
[[ -z "${kernel_component}" ]] && \
|
||||
[[ -z "${nydus_component}" ]] && \
|
||||
[[ -z "${ovmf_component}" ]] && \
|
||||
[[ -z "${qemu_component}" ]] && \
|
||||
[[ -z "${rootfs_component}" ]] && \
|
||||
[[ -z "${shim_v2_component}" ]] && \
|
||||
@ -190,6 +203,7 @@ main() {
|
||||
[ "${firecracker_component}" == "1" ] && cache_firecracker_artifacts
|
||||
[ "${kernel_component}" == "1" ] && cache_kernel_artifacts
|
||||
[ "${nydus_component}" == "1" ] && cache_nydus_artifacts
|
||||
[ "${ovmf_component}" == "1" ] && cache_ovmf_artifacts
|
||||
[ "${qemu_component}" == "1" ] && cache_qemu_artifacts
|
||||
[ "${rootfs_component}" == "1" ] && cache_rootfs_artifacts
|
||||
[ "${shim_v2_component}" == "1" ] && cache_shim_v2_artifacts
|
||||
|
Loading…
Reference in New Issue
Block a user