build: Assert successful completion of cloud-init
Some checks failed
build-image / Build image (push) Failing after 7m40s

This commit is contained in:
2025-07-28 22:44:52 +10:00
parent c2f4b83102
commit 8151350d20
2 changed files with 8 additions and 4 deletions

View File

@ -82,6 +82,7 @@ jobs:
run: | run: |
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
libguestfs-tools \
qemu-system-x86 \ qemu-system-x86 \
qemu-utils qemu-utils
@ -100,9 +101,7 @@ jobs:
-net nic \ -net nic \
-net user -net user
qemu-img convert -O qcow2 ubuntu-vm/ubuntu.img ubuntu-vm/ubuntu-compacted.img virt-ls -a ubuntu-vm/ubuntu.img /var/lib/cloud-init/ | grep -q template-generation-success
ls -lash ubuntu-vm
# semrel: # semrel:
# name: Semantic Release # name: Semantic Release

View File

@ -18,7 +18,7 @@ runcmd:
- truncate -s 0 /etc/hostname /etc/machine-id - truncate -s 0 /etc/hostname /etc/machine-id
- rm -f /etc/ssh/ssh_host_* /var/lib/dbus/machine-id - rm -f /etc/ssh/ssh_host_* /var/lib/dbus/machine-id
- ln -s /etc/machine-id /var/lib/dbus/machine-id - ln -s /etc/machine-id /var/lib/dbus/machine-id
- poweroff - touch /var/lib/cloud-init/template-generation-success
disable_root: false disable_root: false
users: users:
@ -30,3 +30,8 @@ users:
- ${PUBLIC_SSHKEY} - ${PUBLIC_SSHKEY}
ssh_authorized_keys: ssh_authorized_keys:
- ${PUBLIC_SSHKEY} - ${PUBLIC_SSHKEY}
power_state:
delay: now
mode: poweroff
condition: true