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