Fix bad merge

This commit is contained in:
Megan Wright 2023-03-20 13:34:08 +00:00
parent 42978f3e83
commit f31c907f46
3 changed files with 60 additions and 59 deletions

View File

@ -102,8 +102,9 @@ var (
kataVirtioFSDevType = "virtio-fs"
kataOverlayDevType = "overlayfs"
kataWatchableBindDevType = "watchable-bind"
kataVfioDevType = "vfio" // VFIO device to used as VFIO in the container
kataVfioGuestKernelDevType = "vfio-gk" // VFIO device for consumption by the guest kernel
kataVfioPciDevType = "vfio-pci" // VFIO device to used as VFIO in the container
kataVfioPciGuestKernelDevType = "vfio-pci-gk" // VFIO device for consumption by the guest kernel
kataVfioApDevType = "vfio-ap"
sharedDir9pOptions = []string{"trans=virtio,version=9p2000.L,cache=mmap", "nodev"}
sharedDirVirtioFSOptions = []string{}
sharedDirVirtioFSDaxOptions = "dax"

View File

@ -118,7 +118,7 @@ cleanup_and_fail() {
return 1
}
install_cached_tarball_component() {
install_cached_component() {
local component="${1}"
local jenkins_build_url="${2}"
local current_version="${3}"
@ -197,7 +197,7 @@ install_cached_cc_shim_v2() {
wget "${jenkins_build_url}/root_hash_tdx.txt" -O "shim_v2_root_hash_tdx.txt" || return 1
diff "${root_hash_tdx}" "shim_v2_root_hash_tdx.txt" > /dev/null || return 1
install_cached_tarball_component \
install_cached_component \
"${component}" \
"${jenkins_build_url}" \
"${current_version}" \
@ -210,7 +210,7 @@ install_cached_cc_shim_v2() {
# Install static CC cloud-hypervisor asset
install_cc_clh() {
install_cached_tarball_component \
install_cached_component \
"cloud-hypervisor" \
"${jenkins_url}/job/kata-containers-2.0-clh-cc-$(uname -m)/${cached_artifacts_path}" \
"$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.version")" \
@ -269,7 +269,7 @@ install_cc_image() {
local pause_version="$(get_from_kata_deps "externals.pause.version")"
local rust_version="$(get_from_kata_deps "languages.rust.meta.newest-version")"
install_cached_tarball_component \
install_cached_component \
"${component}" \
"${jenkins}" \
"${osbuilder_last_commit}-${guest_image_last_commit}-${initramfs_last_commit}-${agent_last_commit}-${libs_last_commit}-${attestation_agent_version}-${gperf_version}-${libseccomp_version}-${pause_version}-${rust_version}-${image_type}-${AA_KBC}" \
@ -315,7 +315,7 @@ install_cc_kernel() {
local kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
install_cached_tarball_component \
install_cached_component \
"kernel" \
"${jenkins_url}/job/kata-containers-2.0-kernel-cc-$(uname -m)/${cached_artifacts_path}" \
"${kernel_version}-${kernel_kata_config_version}" \
@ -335,7 +335,7 @@ install_cc_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 \
install_cached_component \
"QEMU" \
"${jenkins_url}/job/kata-containers-2.0-qemu-cc-$(uname -m)/${cached_artifacts_path}" \
"${qemu_version}-$(calc_qemu_files_sha256sum)" \
@ -392,7 +392,7 @@ install_cc_shimv2() {
# Install static CC virtiofsd asset
install_cc_virtiofsd() {
local virtiofsd_version="$(get_from_kata_deps "externals.virtiofsd.version")-$(get_from_kata_deps "externals.virtiofsd.toolchain")"
install_cached_tarball_component \
install_cached_component \
"virtiofsd" \
"${jenkins_url}/job/kata-containers-2.0-virtiofsd-cc-$(uname -m)/${cached_artifacts_path}" \
"${virtiofsd_version}" \
@ -416,7 +416,7 @@ install_cached_kernel_component() {
local kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
install_cached_tarball_component \
install_cached_component \
"kernel" \
"${jenkins_url}/job/kata-containers-2.0-kernel-${tee}-cc-$(uname -m)/${cached_artifacts_path}" \
"${kernel_version}-${kernel_kata_config_version}" \
@ -428,7 +428,7 @@ install_cached_kernel_component() {
[ "${tee}" == "tdx" ] && return 0
# SEV specific code path
install_cached_tarball_component \
install_cached_component \
"kernel-modules" \
"${jenkins_url}/job/kata-containers-2.0-kernel-sev-cc-$(uname -m)/${cached_artifacts_path}" \
"${kernel_version}" \
@ -484,7 +484,7 @@ install_cc_tee_qemu() {
export qemu_version="$(yq r $versions_yaml assets.hypervisor.qemu.${tee}.tag)"
export tee="${tee}"
install_cached_tarball_component \
install_cached_component \
"QEMU ${tee}" \
"${jenkins_url}/job/kata-containers-2.0-qemu-${tee}-cc-$(uname -m)/${cached_artifacts_path}" \
"${qemu_version}-$(calc_qemu_files_sha256sum)" \
@ -502,7 +502,7 @@ install_cc_tdx_qemu() {
}
install_cc_tdx_td_shim() {
install_cached_tarball_component \
install_cached_component \
"td-shim" \
"${jenkins_url}/job/kata-containers-2.0-td-shim-cc-$(uname -m)/${cached_artifacts_path}" \
"$(get_from_kata_deps "externals.td-shim.version")-$(get_from_kata_deps "externals.td-shim.toolchain")" \
@ -522,7 +522,7 @@ install_cc_tee_ovmf() {
local component_name="ovmf"
local component_version="$(get_from_kata_deps "externals.ovmf.${tee}.version")"
[ "${tee}" == "tdx" ] && component_name="tdvf"
install_cached_tarball_component \
install_cached_component \
"${component_name}" \
"${jenkins_url}/job/kata-containers-2.0-${component_name}-cc-$(uname -m)/${cached_artifacts_path}" \
"${component_version}" \
@ -556,7 +556,7 @@ install_image() {
local libseccomp_version="$(get_from_kata_deps "externals.libseccomp.version")"
local rust_version="$(get_from_kata_deps "languages.rust.meta.newest-version")"
install_cached_tarball_component \
install_cached_component \
"${component}" \
"${jenkins}" \
"${osbuilder_last_commit}-${guest_image_last_commit}-${agent_last_commit}-${libs_last_commit}-${gperf_version}-${libseccomp_version}-${rust_version}-image" \
@ -582,7 +582,7 @@ install_initrd() {
local libseccomp_version="$(get_from_kata_deps "externals.libseccomp.version")"
local rust_version="$(get_from_kata_deps "languages.rust.meta.newest-version")"
install_cached_tarball_component \
install_cached_component \
"${component}" \
"${jenkins}" \
"${osbuilder_last_commit}-${guest_image_last_commit}-${agent_last_commit}-${libs_last_commit}-${gperf_version}-${libseccomp_version}-${rust_version}-initrd" \
@ -605,7 +605,7 @@ install_kernel() {
export kernel_version="$(yq r $versions_yaml assets.kernel.version)"
local kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
install_cached_tarball_component \
install_cached_component \
"kernel" \
"${jenkins_url}/job/kata-containers-main-kernel-$(uname -m)/${cached_artifacts_path}" \
"${kernel_version}-${kernel_kata_config_version}" \
@ -623,7 +623,7 @@ install_dragonball_experimental_kernel() {
export kernel_version="$(yq r $versions_yaml assets.kernel-dragonball-experimental.version)"
local kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
install_cached_tarball_component \
install_cached_component \
"kernel-dragonball-experimental" \
"${jenkins_url}/job/kata-containers-main-kernel-dragonball-experimental-$(uname -m)/${cached_artifacts_path}" \
"${kernel_version}-${kernel_kata_config_version}" \
@ -642,7 +642,7 @@ install_experimental_kernel() {
export kernel_version="$(yq r $versions_yaml assets.kernel-experimental.tag)"
local kernel_kata_config_version="$(cat ${repo_root_dir}/tools/packaging/kernel/kata_config_version)"
install_cached_tarball_component \
install_cached_component \
"kernel-experimental" \
"${jenkins_url}/job/kata-containers-main-kernel-experimental-$(uname -m)/${cached_artifacts_path}" \
"${kernel_version}-${kernel_kata_config_version}" \
@ -660,7 +660,7 @@ install_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 \
install_cached_component \
"QEMU" \
"${jenkins_url}/job/kata-containers-main-qemu-$(uname -m)/${cached_artifacts_path}" \
"${qemu_version}-$(calc_qemu_files_sha256sum)" \
@ -676,7 +676,7 @@ install_qemu() {
# Install static firecracker asset
install_firecracker() {
install_cached_tarball_component \
install_cached_component \
"firecracker" \
"${jenkins_url}/job/kata-containers-main-firecracker-$(uname -m)/${cached_artifacts_path}" \
"$(get_from_kata_deps "assets.hypervisor.firecracker.version")" \
@ -695,7 +695,7 @@ install_firecracker() {
# Install static cloud-hypervisor asset
install_clh() {
install_cached_tarball_component \
install_cached_component \
"cloud-hypervisor" \
"${jenkins_url}/job/kata-containers-main-clh-$(uname -m)/${cached_artifacts_path}" \
"$(get_from_kata_deps "assets.hypervisor.cloud_hypervisor.version")" \
@ -717,7 +717,7 @@ install_clh() {
# Install static virtiofsd asset
install_virtiofsd() {
install_cached_tarball_component \
install_cached_component \
"virtiofsd" \
"${jenkins_url}/job/kata-containers-main-virtiofsd-$(uname -m)/${cached_artifacts_path}" \
"$(get_from_kata_deps "externals.virtiofsd.version")-$(get_from_kata_deps "externals.virtiofsd.toolchain")" \
@ -735,7 +735,7 @@ install_virtiofsd() {
# Install static nydus asset
install_nydus() {
install_cached_tarball_component \
install_cached_component \
"nydus" \
"${jenkins_url}/job/kata-containers-main-nydus-$(uname -m)/${cached_artifacts_path}" \
"$(get_from_kata_deps "externals.nydus.version")" \
@ -762,7 +762,7 @@ install_shimv2() {
local RUST_VERSION="$(get_from_kata_deps "languages.rust.meta.newest-version")"
local shim_v2_version="${shim_v2_last_commit}-${protocols_last_commit}-${runtime_rs_last_commit}-${GO_VERSION}-${RUST_VERSION}"
install_cached_tarball_component \
install_cached_component \
"shim-v2" \
"${jenkins_url}/job/kata-containers-main-shim-v2-$(uname -m)/${cached_artifacts_path}" \
"${shim_v2_version}" \

View File

@ -209,12 +209,12 @@ get_ovmf_image_name() {
get_qemu_image_name() {
qemu_script_dir="${repo_root_dir}/tools/packaging/static-build/qemu"
echo "${BUILDER_REGISTRY}:qemu-$(get_last_modification ${qemu_script_dir})-$(uname -m)"
echo "${CC_BUILDER_REGISTRY}:qemu-$(get_last_modification ${qemu_script_dir})-$(uname -m)"
}
get_shim_v2_image_name() {
shim_v2_script_dir="${repo_root_dir}/tools/packaging/static-build/shim-v2"
echo "${BUILDER_REGISTRY}:shim-v2-go-$(get_from_kata_deps "languages.golang.meta.newest-version")-rust-$(get_from_kata_deps "languages.rust.meta.newest-version")-$(get_last_modification ${shim_v2_script_dir})-$(uname -m)"
echo "${CC_BUILDER_REGISTRY}:shim-v2-go-$(get_from_kata_deps "languages.golang.meta.newest-version")-rust-$(get_from_kata_deps "languages.rust.meta.newest-version")-$(get_last_modification ${shim_v2_script_dir})-$(uname -m)"
}
get_td_shim_image_name() {