cc: clh: Ensure we try the cache for the specific CC version

Otherwise we'd have to build the component every single time as the main
version is different from the CC one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-07-25 10:19:36 +02:00
parent 19a86aa072
commit 0749022f8c

View File

@ -661,9 +661,16 @@ install_clh_helper() {
features="${2}" features="${2}"
suffix="${3:-""}" suffix="${3:-""}"
# This must only be done as part of the CCv0 branch, as TDX version of
# CLH is not the same as the one used on main
local url="${jenkins_url}/job/kata-containers-main-clh-$(uname -m)${suffix}/${cached_artifacts_path}"
if [[ "${features}" =~ "tdx" ]]; then
local url="${jenkins_url}/job/kata-containers-2.0-clh-cc-$(uname -m)${suffix}/${cached_artifacts_path}"
fi
install_cached_tarball_component \ install_cached_tarball_component \
"cloud-hypervisor${suffix}" \ "cloud-hypervisor${suffix}" \
"${jenkins_url}/job/kata-containers-main-clh-$(uname -m)${suffix}/${cached_artifacts_path}" \ "${url}" \
"$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.version")" \ "$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.version")" \
"" \ "" \
"${final_tarball_name}" \ "${final_tarball_name}" \