From ceabe961e6c438d25a0f351f0b23e28813b34afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Wed, 18 Dec 2024 12:14:13 +0100 Subject: [PATCH] actions: Build only current arch in e2e testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the pre-install-payload builds always all supported payload archs. Let's allow tweaking this by "pre_install_payload_archs" environment variable and use that in our e2e pipelines to only build the current architecture. Signed-off-by: Lukáš Doktor --- .github/workflows/ccruntime_e2e.yaml | 2 ++ install/pre-install-payload/payload.sh | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ccruntime_e2e.yaml b/.github/workflows/ccruntime_e2e.yaml index ef982cb5..2f73ba0b 100644 --- a/.github/workflows/ccruntime_e2e.yaml +++ b/.github/workflows/ccruntime_e2e.yaml @@ -66,8 +66,10 @@ jobs: cd tests/e2e export PATH="$PATH:/usr/local/bin" args="-u" + export pre_install_payload_archs="linux/amd64" if [ $RUNNING_INSTANCE = "s390x-large" ]; then args="" + export pre_install_payload_archs="linux/s390x" elif [ "$RUNNING_INSTANCE" == "ubuntu-20.04" ] || [ "$RUNNING_INSTANCE" == "ubuntu-22.04" ]; then # Remove the pre-installed docker/containerd sudo apt-get remove docker* containerd* -y diff --git a/install/pre-install-payload/payload.sh b/install/pre-install-payload/payload.sh index d5a8439b..f0f0a9f7 100755 --- a/install/pre-install-payload/payload.sh +++ b/install/pre-install-payload/payload.sh @@ -11,15 +11,10 @@ official_containerd_repo=${official_containerd_repo:-"https://github.com/contain vfio_gpu_containerd_repo=${vfio_gpu_containerd_repo:-"https://github.com/confidential-containers/containerd"} nydus_snapshotter_repo=${nydus_snapshotter_repo:-"https://github.com/containerd/nydus-snapshotter"} extra_docker_manifest_flags="${extra_docker_manifest_flags:-}" +archs=${pre_install_payload_archs:-"linux/amd64 linux/s390x linux/arm64"} registry="${registry:-quay.io/confidential-containers/reqs-payload}" -supported_arches=( - "linux/amd64" - "linux/s390x" - "linux/arm64" -) - function setup_env_for_arch() { case "$1" in "linux/amd64") @@ -58,7 +53,7 @@ function build_payload() { tag=$(git rev-parse HEAD) manifest_args=() - for arch in "${supported_arches[@]}"; do + for arch in ${archs}; do setup_env_for_arch "${arch}" echo "Building containerd payload image for ${arch}"