local-build: Use cached QEMU when possible

As we've added the support for caching components, let's use them
whenever those are available.

Fixes: #6480

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-03-16 13:48:22 +01:00
parent 1e1c843b8b
commit 09ce4ab893

View File

@ -187,9 +187,19 @@ install_experimental_kernel() {
# Install static qemu asset
install_qemu() {
info "build static qemu"
export qemu_repo="$(yq r $versions_yaml assets.hypervisor.qemu.url)"
export qemu_version="$(yq r $versions_yaml assets.hypervisor.qemu.version)"
install_cached_tarball_component \
"QEMU" \
"${jenkins_url}/job/kata-containers-main-qemu-$(uname -m)/${cached_artifacts_path}" \
"${qemu_version}-$(calc_qemu_files_sha256sum)" \
"$(get_qemu_image_name)" \
"${final_tarball_name}" \
"${final_tarball_path}" \
&& return 0
info "build static qemu"
"${qemu_builder}"
tar xvf "${builddir}/kata-static-qemu.tar.gz" -C "${destdir}"
}