Merge pull request #9563 from fidencio/topic/agent-use-policy-by-default

build: Build the shipped agent with policy enabled
This commit is contained in:
Fabiano Fidêncio 2024-05-01 12:22:05 +02:00 committed by GitHub
commit f04a7a55ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 31 deletions

View File

@ -28,7 +28,6 @@ jobs:
matrix:
asset:
- agent
- agent-opa
- agent-ctl
- cloud-hypervisor
- cloud-hypervisor-glibc
@ -65,8 +64,6 @@ jobs:
exclude:
- asset: agent
stage: release
- asset: agent-opa
stage: release
- asset: cloud-hypervisor-glibc
stage: release
- asset: pause-image

View File

@ -28,7 +28,6 @@ jobs:
matrix:
asset:
- agent
- agent-opa
- kernel
- qemu
- rootfs-initrd

View File

@ -28,7 +28,6 @@ jobs:
matrix:
asset:
- agent
- agent-opa
- coco-guest-components
- kernel
- kernel-confidential

View File

@ -337,7 +337,7 @@ $ mkdir kata-artifacts
$ build_dir=$(readlink -f build)
$ cp -r $build_dir/*.tar.xz kata-artifacts
$ ls -1 kata-artifacts
kata-static-agent-opa.tar.xz
kata-static-agent.tar.xz
kata-static-boot-image-se.tar.xz
kata-static-coco-guest-components.tar.xz
kata-static-kernel-confidential.tar.xz

View File

@ -79,9 +79,6 @@ serial-targets:
agent-tarball: copy-scripts-for-the-agent-build
${MAKE} $@-build
agent-opa-tarball: copy-scripts-for-the-agent-build
${MAKE} $@-build
agent-ctl-tarball:
${MAKE} $@-build
@ -151,13 +148,13 @@ stratovirt-tarball:
rootfs-image-tarball: agent-tarball
${MAKE} $@-build
rootfs-image-confidential-tarball: agent-opa-tarball pause-image-tarball coco-guest-components-tarball kernel-confidential-tarball
rootfs-image-confidential-tarball: agent-tarball pause-image-tarball coco-guest-components-tarball kernel-confidential-tarball
${MAKE} $@-build
rootfs-initrd-mariner-tarball: agent-opa-tarball
rootfs-initrd-mariner-tarball: agent-tarball
${MAKE} $@-build
rootfs-initrd-confidential-tarball: agent-opa-tarball pause-image-tarball coco-guest-components-tarball kernel-confidential-tarball
rootfs-initrd-confidential-tarball: agent-tarball pause-image-tarball coco-guest-components-tarball kernel-confidential-tarball
${MAKE} $@-build
rootfs-initrd-tarball: agent-tarball

View File

@ -89,7 +89,6 @@ options:
--build=<asset> :
all
agent
agent-opa
agent-ctl
boot-image-se
coco-guest-components
@ -217,9 +216,6 @@ install_cached_tarball_component() {
get_agent_tarball_path() {
agent_local_build_dir="${repo_root_dir}/tools/packaging/kata-deploy/local-build/build"
agent_tarball_name="kata-static-agent.tar.xz"
if [ "${AGENT_POLICY:-no}" = "yes" ]; then
agent_tarball_name="kata-static-agent-opa.tar.xz"
fi
echo "${agent_local_build_dir}/${agent_tarball_name}"
}
@ -322,6 +318,7 @@ install_image() {
fi
export AGENT_TARBALL=$(get_agent_tarball_path)
"${rootfs_builder}" --osname="${os_name}" --osversion="${os_version}" --imagetype=image --prefix="${prefix}" --destdir="${destdir}" --image_initrd_suffix="${variant}"
}
@ -391,6 +388,7 @@ install_initrd() {
fi
export AGENT_TARBALL=$(get_agent_tarball_path)
"${rootfs_builder}" --osname="${os_name}" --osversion="${os_version}" --imagetype=initrd --prefix="${prefix}" --destdir="${destdir}" --image_initrd_suffix="${variant}"
}
@ -765,9 +763,7 @@ install_ovmf_sev() {
install_ovmf "sev" "edk2-sev.tar.gz"
}
install_agent_helper() {
agent_policy="${1:-no}"
install_agent() {
latest_artefact="$(git log -1 --pretty=format:"%h" ${repo_root_dir}/src/agent)"
latest_builder_image="$(get_agent_image_name)"
@ -785,15 +781,7 @@ install_agent_helper() {
export GPERF_URL="$(get_from_kata_deps "externals.gperf.url")"
info "build static agent"
DESTDIR="${destdir}" AGENT_POLICY=${agent_policy} PULL_TYPE=${PULL_TYPE} "${agent_builder}"
}
install_agent() {
install_agent_helper
}
install_agent_opa() {
install_agent_helper "yes"
DESTDIR="${destdir}" AGENT_POLICY="yes" PULL_TYPE=${PULL_TYPE} "${agent_builder}"
}
install_coco_guest_components() {
@ -989,8 +977,6 @@ handle_build() {
agent) install_agent ;;
agent-opa) install_agent_opa ;;
agent-ctl) install_agent_ctl ;;
boot-image-se) install_se_image ;;
@ -1140,7 +1126,6 @@ main() {
local silent
build_targets=(
agent
agent-opa
agent-ctl
cloud-hypervisor
coco-guest-components