diff --git a/.github/workflows/e2e-baremetal.yml b/.github/workflows/e2e-baremetal.yml index 16d612575..20cef6f31 100644 --- a/.github/workflows/e2e-baremetal.yml +++ b/.github/workflows/e2e-baremetal.yml @@ -158,6 +158,20 @@ jobs: - name: Install go-junit-report on runner run: go install github.com/jstemmer/go-junit-report/v2@latest + # The eks suite's CreateCluster boots a control-plane VM from the eks-node + # AMI. Built here because libguestfs needs source and network, which the + # runner has and the PXE-booted node does not; bm-bootstrap.sh imports it. + - name: Build eks-node AMI (libguestfs, runner) + if: contains(inputs.suites, 'eks') + working-directory: spinifex + run: | + set -euo pipefail + # direct backend = no libvirt. Set here rather than in the script: + # it has to be in the environment the build itself runs in. + export LIBGUESTFS_BACKEND=direct + "${GITHUB_WORKSPACE}/spinifex/.github/scripts/ensure-libguestfs.sh" + make build-eks-node-image + - name: Run Bare-Metal E2E env: BM_CI_PASSWORD: ${{ secrets.BM_CI_PASSWORD }} @@ -167,6 +181,10 @@ jobs: SPX_EXTERNAL_POOL: ${{ env.SPINIFEX_CI_POOL }} BM_SUITES: ${{ inputs.suites || 'single cert lb' }} BM_SUITE_ENV: ${{ inputs.suite-env }} + # Empty unless the eks build above ran, and bm-bootstrap.sh skips the + # import when unset, so the other suites are unaffected. + BM_EKS_IMAGE: ${{ contains(inputs.suites, 'eks') && '/tmp/eks-node-image-build/eks-node-alpine.raw' || '' }} + BM_EKS_MANIFEST: ${{ contains(inputs.suites, 'eks') && format('{0}/spinifex/scripts/images/eks-node/manifest.conf', github.workspace) || '' }} run: | mkdir -p "${ARTIFACT_DIR}" set -o pipefail