Update .gitea/workflows/actions.yaml
This commit is contained in:
@@ -60,10 +60,10 @@ jobs:
|
||||
run: |
|
||||
curl -L \
|
||||
https://sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2024.04/ubuntu-24.04-server-cloudimg-amd64.img \
|
||||
-o ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img \
|
||||
-o ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img \
|
||||
-u ${{ secrets.REPO_USERNAME }}:${{ secrets.REPO_PASSWORD }}
|
||||
|
||||
qemu-img resize ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img +5G
|
||||
qemu-img resize ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img +5G
|
||||
- name: Generate seed ISO
|
||||
run: |
|
||||
envsubst < cloud-init/user-data.template > cloud-init/user-data
|
||||
@@ -86,7 +86,7 @@ jobs:
|
||||
-m 3072 \
|
||||
-smp 2 \
|
||||
-cpu host \
|
||||
-drive file=ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img,if=virtio,format=qcow2 \
|
||||
-drive file=ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img,if=virtio,format=qcow2 \
|
||||
-drive file=ubuntu-vm/seed.iso,format=raw,media=cdrom \
|
||||
-nographic \
|
||||
-net nic \
|
||||
@@ -95,15 +95,15 @@ jobs:
|
||||
-chardev socket,path=qga.sock,server=on,wait=off,id=qga0 \
|
||||
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
|
||||
|
||||
if ! guestfish --ro -a ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img -i stat /var/log/template-generation-success; then
|
||||
if ! guestfish --ro -a ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img -i stat /var/log/template-generation-success; then
|
||||
echo "VM provisioning encountered errors - exiting"
|
||||
exit 1
|
||||
fi
|
||||
- name: Compress image file
|
||||
run: |
|
||||
virt-sparsify --compress \
|
||||
ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img \
|
||||
ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}-compacted.img
|
||||
ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img \
|
||||
ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}-compacted.img
|
||||
- name: Upload image file
|
||||
run: |
|
||||
REPO_TOKEN=$(curl -fsSL -X POST \
|
||||
@@ -112,9 +112,9 @@ jobs:
|
||||
-d '{"username": "admin", "password": "${{ secrets.REPO_PASSWORD }}"}' \
|
||||
)
|
||||
curl -fsSL -X POST \
|
||||
http://filebrowser.filebrowser.svc.cluster.local:80/api/resources/rel/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img?override=true \
|
||||
http://filebrowser.filebrowser.svc.cluster.local:80/api/resources/rel/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img?override=true \
|
||||
--header "X-Auth: $REPO_TOKEN" \
|
||||
--upload-file "ubuntu-vm/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}-compacted.img"
|
||||
--upload-file "ubuntu-vm/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}-compacted.img"
|
||||
|
||||
curl -ksS -X PUT "https://lab-hv-vip.bessems.lan/v1/harvesterhci.io.virtualmachineimages" \
|
||||
-H "Authorization: Bearer ${{ secrets.HV_TOKEN }}" \
|
||||
@@ -126,9 +126,9 @@ jobs:
|
||||
"namespace": "default"
|
||||
},
|
||||
"spec": {
|
||||
"displayName": "ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}",
|
||||
"displayName": "ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}",
|
||||
"sourceType": "download",
|
||||
"url": "https://${{ secrets.REPO_USERNAME }}:${{ secrets.REPO_PASSWORD }}@sn.itch.fyi/Repository/rel/ubuntu-24.04.2-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img"
|
||||
"url": "https://${{ secrets.REPO_USERNAME }}:${{ secrets.REPO_PASSWORD }}@sn.itch.fyi/Repository/rel/ubuntu-24.04-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user