|
| 1 | +# Builds the unattended Ubuntu ISO and installs it from UEFI USB media in QEMU. |
| 2 | +# It completes the required reboots and verifies the installed DAppNode system. |
| 3 | +name: Ubuntu unattended USB ISO end-to-end |
| 4 | + |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + pull_request: |
| 8 | + # Weekly run against master to catch breakage from upstream package changes. |
| 9 | + schedule: |
| 10 | + - cron: "0 7 * * 1" |
| 11 | + timezone: "Europe/Madrid" |
| 12 | + |
| 13 | +permissions: |
| 14 | + contents: read |
| 15 | + |
| 16 | +concurrency: |
| 17 | + group: ubuntu-iso-e2e-${{ github.ref }} |
| 18 | + cancel-in-progress: true |
| 19 | + |
| 20 | +jobs: |
| 21 | + install: |
| 22 | + name: Install Ubuntu unattended ISO via UEFI USB |
| 23 | + runs-on: ubuntu-latest |
| 24 | + timeout-minutes: 90 |
| 25 | + |
| 26 | + steps: |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v6 |
| 29 | + |
| 30 | + - name: Build Ubuntu unattended ISO |
| 31 | + run: | |
| 32 | + export BASE_OS=ubuntu |
| 33 | + export UNATTENDED=true |
| 34 | + # Retry so a transient mirror outage does not fail the whole E2E run. |
| 35 | + for attempt in 1 2 3; do |
| 36 | + docker compose up --build --abort-on-container-exit --exit-code-from dappnode_installer && break |
| 37 | + [ "${attempt}" -lt 3 ] || exit 1 |
| 38 | + echo "::warning::ISO build attempt ${attempt} failed; retrying in 30s" |
| 39 | + sleep 30 |
| 40 | + done |
| 41 | + ls -lrt images/Dappnode-ubuntu-*.iso |
| 42 | +
|
| 43 | + - name: Install QEMU test dependencies |
| 44 | + run: | |
| 45 | + sudo apt-get update |
| 46 | + sudo apt-get install -y --no-install-recommends qemu-system-x86 qemu-utils ovmf socat sshpass dnsmasq-base |
| 47 | + if [ -e /dev/kvm ]; then |
| 48 | + sudo chmod a+rw /dev/kvm |
| 49 | + fi |
| 50 | +
|
| 51 | + - name: Create the guest network |
| 52 | + run: | |
| 53 | + mkdir -p test-output/ubuntu-e2e |
| 54 | + sudo E2E_NETWORK_STATE_DIR="${PWD}/test-output/ubuntu-e2e/network" bash test/e2e_network.sh up |
| 55 | +
|
| 56 | + - name: Complete Ubuntu unattended UEFI USB installation |
| 57 | + env: |
| 58 | + E2E_BOOT_MODE: usb |
| 59 | + E2E_FIRMWARE: uefi |
| 60 | + E2E_TAP_IFACE: dne2e0 |
| 61 | + run: | |
| 62 | + ubuntu_iso=$(find images -maxdepth 1 -type f -name 'Dappnode-ubuntu-*-live-server-amd64.iso' -print -quit) |
| 63 | + test -n "${ubuntu_iso}" |
| 64 | + bash test/e2e_ubuntu_iso.sh "${ubuntu_iso}" |
| 65 | +
|
| 66 | + - name: Make network logs readable |
| 67 | + if: always() |
| 68 | + run: sudo chmod -R a+rX test-output || true |
| 69 | + |
| 70 | + - name: Upload installation logs |
| 71 | + if: always() |
| 72 | + uses: actions/upload-artifact@v4 |
| 73 | + with: |
| 74 | + name: ubuntu-unattended-usb-installation-logs |
| 75 | + path: test-output/ubuntu-e2e/ |
| 76 | + if-no-files-found: ignore |
| 77 | + retention-days: 7 |
0 commit comments