From de5f96b4de452c0dbf020d84df9f9443d08da1c2 Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Fri, 22 Aug 2025 17:57:02 -0300 Subject: [PATCH] ci/baremetal: Use find_s3_project_artifact on baremetal_build.sh So we can reuse artifact finding functionality and also can make the `gallo/mesa` workaround to work. Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/container/baremetal_build.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci/container/baremetal_build.sh b/.gitlab-ci/container/baremetal_build.sh index 02181176c87..e4605085bdf 100644 --- a/.gitlab-ci/container/baremetal_build.sh +++ b/.gitlab-ci/container/baremetal_build.sh @@ -7,16 +7,13 @@ set -o xtrace # Fetch the arm-built rootfs image and unpack it in our x86_64 container (saves # network transfer, disk usage, and runtime on test jobs) -S3_PATH="https://${S3_HOST}/${S3_KERNEL_BUCKET}" - -if curl -L --retry 3 -f --retry-delay 10 -s --head "${S3_PATH}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}/lava-rootfs.tar.zst"; then - ARTIFACTS_URL="${S3_PATH}/${FDO_UPSTREAM_REPO}/${LAVA_DISTRIBUTION_TAG}" -else - ARTIFACTS_URL="${S3_PATH}/${S3_PROJECT_PATH}/${LAVA_DISTRIBUTION_TAG}" -fi +# shellcheck disable=SC2034 # S3_BASE_PATH is used in find_s3_project_artifact +S3_BASE_PATH="${S3_HOST}/${S3_KERNEL_BUCKET}" +ARTIFACTS_PATH="${LAVA_DISTRIBUTION_TAG}/lava-rootfs.tar.zst" +ARTIFACTS_URL="$(find_s3_project_artifact "${ARTIFACTS_PATH}")" curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ - "${ARTIFACTS_URL}"/lava-rootfs.tar.zst -o rootfs.tar.zst + "${ARTIFACTS_URL}" -o rootfs.tar.zst mkdir -p /rootfs-"$arch" tar -C /rootfs-"$arch" '--exclude=./dev/*' --zstd -xf rootfs.tar.zst rm rootfs.tar.zst