diff --git a/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh b/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh index 55db4f173c..40d35f3886 100755 --- a/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh +++ b/tools/packaging/static-build/cloud-hypervisor/build-static-clh.sh @@ -13,8 +13,17 @@ kata_version="${kata_version:-}" source "${script_dir}/../../scripts/lib.sh" +cloud_hypervisor_repo="${cloud_hypervisor_repo:-}" cloud_hypervisor_version="${cloud_hypervisor_version:-}" +if [ -z "$cloud_hypervisor_repo" ]; then + info "Get cloud_hypervisor information from runtime versions.yaml" + cloud_hypervisor_url=$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.url" "${kata_version}") + [ -n "$cloud_hypervisor_url" ] || die "failed to get cloud_hypervisor url" + cloud_hypervisor_repo="${cloud_hypervisor_url}.git" +fi +[ -n "$cloud_hypervisor_repo" ] || die "failed to get cloud_hypervisor repo" + [ -n "$cloud_hypervisor_version" ] || cloud_hypervisor_version=$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.version" "${kata_version}") [ -n "$cloud_hypervisor_version" ] || die "failed to get cloud_hypervisor version"