From 1281381096bf14e941dd0e418a5d69897ef6be35 Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Wed, 15 Jul 2026 07:54:21 +1000 Subject: [PATCH] fix(ci): publish-system-image.sh honors SYSTEM_IMAGE_BUILD_DIR The build script derives BUILD_DIR from SYSTEM_IMAGE_BUILD_DIR (the AMI publish workflow points it off tmpfs so the 16G Ubuntu GPU raw fits), but the publish step hardcoded /tmp and could not find the freshly built raw. GPU legs failed 'Raw image not found'; Alpine legs silently reused stale pre-existing /tmp raws on the persistent runner. Mirror the build script's derivation so publish looks where the build actually wrote. --- scripts/publish-system-image.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/publish-system-image.sh b/scripts/publish-system-image.sh index b2a684345..601b20d10 100755 --- a/scripts/publish-system-image.sh +++ b/scripts/publish-system-image.sh @@ -67,7 +67,10 @@ if [[ -z "${IMAGE_NAME:-}" ]]; then fi # Mirror build-system-image.sh's derived paths so we reuse its cached raw. -BUILD_DIR="/tmp/${IMAGE_NAME}-image-build" +# Honor SYSTEM_IMAGE_BUILD_DIR exactly as the build script does — the workflow +# points it off tmpfs so the 16G Ubuntu GPU raw fits, and the publish step must +# look where the build actually wrote, not a hardcoded /tmp. +BUILD_DIR="${SYSTEM_IMAGE_BUILD_DIR:-/tmp}/${IMAGE_NAME}-image-build" RAW_IMAGE="${BUILD_DIR}/${IMAGE_NAME}-${DISTRO}.raw" OBJECT_BASE="${AMI_NAME:-$IMAGE_NAME}-${ARCH}"