mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-18 15:28:10 +00:00
packaging: coco-guest-components: Allow building the project
The Confidential Containers guest-components will, in the very short future, be part of the Kata Containers rootfs that's used by the Confidential Containers usecase. This commit introduces the ability to, standalone, build the component locally and as part of our CI, and this can be done by calling: `make coco-guest-components-tarball` Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com> Signed-off-by: Linda Yu <linda.yu@intel.com> Co-authored-by: stevenhorsman <steven@uk.ibm.com> Co-authored-by: Jakob Naucke <jakob.naucke@ibm.com> Co-authored-by: Wang, Arron <arron.wang@intel.com> Co-authored-by: zhouliang121 <liang.a.zhou@linux.alibaba.com> Co-authored-by: Alex Carter <alex.carter@ibm.com> Co-authored-by: Suraj Deshmukh <suraj.deshmukh@microsoft.com> Co-authored-by: Xynnn007 <xynnn@linux.alibaba.com>
This commit is contained in:
@@ -88,6 +88,9 @@ agent-opa-tarball: copy-scripts-for-the-agent-build
|
||||
agent-ctl-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
coco-guest-components-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
cloud-hypervisor-tarball:
|
||||
${MAKE} $@-build
|
||||
|
||||
|
@@ -86,6 +86,7 @@ TARGET_BRANCH="${TARGET_BRANCH:-}"
|
||||
BUILDER_REGISTRY="${BUILDER_REGISTRY:-}"
|
||||
PUSH_TO_REGISTRY="${PUSH_TO_REGISTRY:-"no"}"
|
||||
AGENT_CONTAINER_BUILDER="${AGENT_CONTAINER_BUILDER:-}"
|
||||
COCO_GUEST_COMPONENTS_CONTAINER_BUILDER="${COCO_GUEST_COMPONENTS_CONTAINER_BUILDER:-}"
|
||||
INITRAMFS_CONTAINER_BUILDER="${INITRAMFS_CONTAINER_BUILDER:-}"
|
||||
KERNEL_CONTAINER_BUILDER="${KERNEL_CONTAINER_BUILDER:-}"
|
||||
OVMF_CONTAINER_BUILDER="${OVMF_CONTAINER_BUILDER:-}"
|
||||
@@ -110,6 +111,7 @@ docker run \
|
||||
--env BUILDER_REGISTRY="${BUILDER_REGISTRY}" \
|
||||
--env PUSH_TO_REGISTRY="${PUSH_TO_REGISTRY}" \
|
||||
--env AGENT_CONTAINER_BUILDER="${AGENT_CONTAINER_BUILDER}" \
|
||||
--env COCO_GUEST_COMPONENTS_CONTAINER_BUILDER="${COCO_GUEST_COMPONENTS_CONTAINER_BUILDER}" \
|
||||
--env INITRAMFS_CONTAINER_BUILDER="${INITRAMFS_CONTAINER_BUILDER}" \
|
||||
--env KERNEL_CONTAINER_BUILDER="${KERNEL_CONTAINER_BUILDER}" \
|
||||
--env OVMF_CONTAINER_BUILDER="${OVMF_CONTAINER_BUILDER}" \
|
||||
|
@@ -23,6 +23,7 @@ readonly version_file="${repo_root_dir}/VERSION"
|
||||
readonly versions_yaml="${repo_root_dir}/versions.yaml"
|
||||
|
||||
readonly agent_builder="${static_build_dir}/agent/build.sh"
|
||||
readonly coco_guest_components_builder="${static_build_dir}/coco-guest-components/build.sh"
|
||||
readonly clh_builder="${static_build_dir}/cloud-hypervisor/build-static-clh.sh"
|
||||
readonly firecracker_builder="${static_build_dir}/firecracker/build-static-firecracker.sh"
|
||||
readonly kernel_builder="${static_build_dir}/kernel/build.sh"
|
||||
@@ -87,6 +88,7 @@ options:
|
||||
agent-opa
|
||||
agent-ctl
|
||||
boot-image-se
|
||||
coco-guest-components
|
||||
cloud-hypervisor
|
||||
cloud-hypervisor-glibc
|
||||
firecracker
|
||||
@@ -710,6 +712,22 @@ install_agent_opa() {
|
||||
install_agent_helper "yes"
|
||||
}
|
||||
|
||||
install_coco_guest_components() {
|
||||
latest_artefact="$(get_from_kata_deps "externals.coco-guest-components.version")-$(get_from_kata_deps "externals.coco-guest-components.toolchain")"
|
||||
latest_builder_image="$(get_coco_guest_components_image_name)"
|
||||
|
||||
install_cached_tarball_component \
|
||||
"${build_target}" \
|
||||
"${latest_artefact}" \
|
||||
"${latest_builder_image}" \
|
||||
"${final_tarball_name}" \
|
||||
"${final_tarball_path}" \
|
||||
&& return 0
|
||||
|
||||
info "build static coco-guest-components"
|
||||
"${coco_guest_components_builder}"
|
||||
}
|
||||
|
||||
install_tools_helper() {
|
||||
tool=${1}
|
||||
|
||||
@@ -821,9 +839,11 @@ handle_build() {
|
||||
agent-opa) install_agent_opa ;;
|
||||
|
||||
agent-ctl) install_agent_ctl ;;
|
||||
|
||||
|
||||
boot-image-se) install_se_image ;;
|
||||
|
||||
coco-guest-components) install_coco_guest_components ;;
|
||||
|
||||
cloud-hypervisor) install_clh ;;
|
||||
|
||||
cloud-hypervisor-glibc) install_clh_glibc ;;
|
||||
@@ -941,6 +961,7 @@ main() {
|
||||
agent-opa
|
||||
agent-ctl
|
||||
cloud-hypervisor
|
||||
coco-guest-components
|
||||
firecracker
|
||||
genpolicy
|
||||
kata-ctl
|
||||
|
Reference in New Issue
Block a user