Merge pull request #6670 from fidencio/topic/fix-caching-of-tdvf-and-tdx-qemu

cache-components: Fix caching of TDVF and QEMU for TDX
This commit is contained in:
Fabiano Fidêncio 2023-04-16 09:04:04 +02:00 committed by GitHub
commit 243cb2e3af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -34,7 +34,7 @@ jobs:
cat tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml | grep "${{ inputs.registry }}/${{ inputs.repo }}:${{ inputs.tag }}" || die "Failed to setup the tests image"
kubectl apply -f tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml
kubectl apply -k tools/packaging/kata-deploy/kata-deploy/overlay/k3s
kubectl apply -k tools/packaging/kata-deploy/kata-deploy/overlays/k3s
kubectl -n kube-system wait --timeout=10m --for=condition=Ready -l name=kata-deploy pod
kubectl apply -f tools/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml
@ -51,7 +51,7 @@ jobs:
- name: Delete kata-deploy
if: always()
run: |
kubectl delete -k tools/packaging/kata-deploy/kata-deploy/overlay/k3s
kubectl delete -k tools/packaging/kata-deploy/kata-deploy/overlays/k3s
kubectl -n kube-system wait --timeout=10m --for=delete -l name=kata-deploy pod
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${{ inputs.registry }}/${{ inputs.repo }}:${{ inputs.tag }}|g" tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml

View File

@ -44,8 +44,9 @@ cache_nydus_artifacts() {
}
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")"
[ "${OVMF_FLAVOUR}" == "tdx" ] && OVMF_FLAVOUR="tdvf"
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}"
}
@ -53,6 +54,7 @@ cache_ovmf_artifacts() {
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")
[ -z "${current_qemu_version}" ] && current_qemu_version=$(get_from_kata_deps "assets.hypervisor.${QEMU_FLAVOUR}.tag")
local qemu_sha=$(calc_qemu_files_sha256sum)
local current_qemu_image="$(get_qemu_image_name)"
create_cache_asset "${qemu_tarball_name}" "${current_qemu_version}-${qemu_sha}" "${current_qemu_image}"