build: Move download of source iso file out of workflow and check for pre-existence instead
Some checks failed
build-image / Build image (push) Failing after 2m35s

This commit is contained in:
2025-07-25 16:59:33 +10:00
parent 6e5055b910
commit 27e33ebdf6

View File

@ -69,16 +69,15 @@ jobs:
-joliet \
-rock \
cloud-init/meta-data cloud-init/user-data
ls -lash ubuntu-vm
env:
ROOT_HASHED_PASSWORD: ${{ secrets.ROOT_HASHED_PASSWORD }}
PUBLIC_SSHKEY: ${{ secrets.PUBLIC_SSHKEY }}
- name: Download Ubuntu ISO
- name: Assert source Ubuntu ISO
run: |
if [ ! -f ubuntu-vm/ubuntu-24.04.iso ]; then
curl -L -o ubuntu-vm/ubuntu-24.04.iso https://releases.ubuntu.com/24.04/ubuntu-24.04.2-desktop-amd64.iso
fi
# TODO: Make this path configurable in a yaml file
[[ ! -f '/iso/Canonical/Ubuntu Server 24.04/ubuntu-24.04.2-desktop-amd64.iso' ]] || {
echo 'Missing source iso file - exiting'; exit 1
}
- name: Create empty QCOW2 disk
run: |
apt-get update && \
@ -98,7 +97,7 @@ jobs:
--vcpus 2 \
--disk path=ubuntu-vm/ubuntu.qcow2,size=10,format=qcow2 \
--disk path=ubuntu-vm/seed.iso,device=cdrom \
--cdrom ubuntu-vm/ubuntu-24.04.iso \
--cdrom '/iso/Canonical/Ubuntu Server 24.04/ubuntu-24.04.2-desktop-amd64.iso' \
--os-variant ubuntu24.04 \
--graphics none \
--network network=default \