mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 14:54:19 +01:00
Let's check for the cached version of the components as part of the kata-deploy-binaries.sh as here we already have the needed info for checking whether a component is cached or not, and to use it without depending on changes made on each one of the builder scripts. Fixes: #5816 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (c) 2022 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
source "${script_dir}/../../scripts/lib.sh"
|
|
|
|
qemu_repo="${qemu_repo:-}"
|
|
qemu_version="${qemu_version:-}"
|
|
tee="${tee:-}"
|
|
|
|
export prefix="/opt/confidential-containers/"
|
|
|
|
if [ -z "${qemu_repo}" ]; then
|
|
info "Get qemu information from runtime versions.yaml"
|
|
export qemu_url=$(get_from_kata_deps "assets.hypervisor.qemu.url")
|
|
[ -n "${qemu_url}" ] || die "failed to get qemu url"
|
|
export qemu_repo="${qemu_url}.git"
|
|
fi
|
|
|
|
[ -n "${qemu_repo}" ] || die "failed to get qemu repo"
|
|
[ -n "${qemu_version}" ] || export qemu_version=$(get_from_kata_deps "assets.hypervisor.qemu.version")
|
|
[ -n "${qemu_version}" ] || die "failed to get qemu version"
|
|
|
|
qemu_tarball_name="kata-static-qemu-cc.tar.gz"
|
|
[ -n "${tee}" ] && qemu_tarball_name="kata-static-${tee}-qemu-cc.tar.gz"
|
|
"${script_dir}/build-base-qemu.sh" "${qemu_repo}" "${qemu_version}" "${tee}" "${qemu_tarball_name}"
|