From 58c2e18ad1e2a46ceb357a1e13030c28f14b1e4d Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Thu, 14 May 2026 16:02:03 +1000 Subject: [PATCH] fix(ci): cache ubuntu-24.04 cloud image on runner, pass to bm-bootstrap Add a step before the E2E run that ensures the Ubuntu 24.04 noble cloud image is cached at BM_ISO_CACHE. Downloads from ubuntu.com if missing, prints cached size if present. Passes path via BM_UBUNTU_IMAGE to bm-bootstrap.sh which SCPs it to the node for --file import. --- .github/workflows/e2e-baremetal.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/e2e-baremetal.yml b/.github/workflows/e2e-baremetal.yml index abd88b1dc..cb8991326 100644 --- a/.github/workflows/e2e-baremetal.yml +++ b/.github/workflows/e2e-baremetal.yml @@ -79,11 +79,24 @@ jobs: EPDU_SNMP_PRIV_PASS=${{ secrets.BM_EPDU_PRIV_PASS }} EOF + - name: Cache Ubuntu 24.04 cloud image + run: | + IMG="${BM_ISO_CACHE}/ubuntu-24.04-cloudimg-amd64.img" + if [ ! -f "$IMG" ]; then + echo "Downloading Ubuntu 24.04 cloud image..." + sudo curl -fsSL -o "$IMG" \ + "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img" + echo " Downloaded $(du -h "$IMG" | cut -f1)" + else + echo "Ubuntu 24.04 cloud image cached ($(du -h "$IMG" | cut -f1))" + fi + - name: Run Bare-Metal E2E env: BM_CI_PASSWORD: ${{ secrets.BM_CI_PASSWORD }} BM_SSH_KEY: ${{ runner.temp }}/bm-ci BM_EPDU_ENV: ${{ runner.temp }}/epdu.env + BM_UBUNTU_IMAGE: ${{ env.BM_ISO_CACHE }}/ubuntu-24.04-cloudimg-amd64.img SPX_EXTERNAL_POOL: ${{ env.SPINIFEX_CI_POOL }} run: | sudo -E mulga/scripts/baremetal/run-baremetal-e2e.sh \