Skip to content

Commit

Permalink
fix: use VFS storage for building VM images
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jun 27, 2024
1 parent 53706c9 commit d3e3a21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions task/build-vm-image/0.1/build-vm-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,25 @@ spec:
#!/bin/bash
set -e
dnf -y install buildah
buildah manifest create "$OUTPUT_IMAGE"
buildah --storage-driver=vfs manifest create "$OUTPUT_IMAGE"
# show contents of /output
ls -alR /output
if [ -f "/output/qcow2/disk.qcow2" ]; then
echo -e "Found qcow2 image."
gzip /output/qcow2/disk.qcow2
buildah manifest add --arch $(arch) --os linux --artifact --artifact-type application/vnd.diskimage.qcow2.gzip $OUTPUT_IMAGE /output/qcow2/disk.qcow2.gz
buildah --storage-driver=vfs manifest add --arch $(arch) --os linux --artifact --artifact-type application/vnd.diskimage.qcow2.gzip $OUTPUT_IMAGE /output/qcow2/disk.qcow2.gz
elif [ -f "/output/image/disk.raw" ]; then
echo -e "Found raw image."
gzip /output/image/disk.raw
buildah manifest add --arch $(arch) --os linux --artifact --artifact-type application/vnd.diskimage.raw.gzip $OUTPUT_IMAGE /output/image/disk.raw.gz
buildah --storage-driver=vfs manifest add --arch $(arch) --os linux --artifact --artifact-type application/vnd.diskimage.raw.gzip $OUTPUT_IMAGE /output/image/disk.raw.gz
elif [ -f "/output/bootiso/install.iso" ]; then
echo -e "Found iso image."
gzip /output/bootiso/install.iso
buildah manifest add --arch $(arch) --os linux --artifact --artifact-type application/vnd.diskimage.iso.gzip $OUTPUT_IMAGE /output/bootiso/install.iso.gz
buildah --storage-driver=vfs manifest add --arch $(arch) --os linux --artifact --artifact-type application/vnd.diskimage.iso.gzip $OUTPUT_IMAGE /output/bootiso/install.iso.gz
fi
buildah manifest push --digestfile image-digest --authfile /.docker/config.json --all $OUTPUT_IMAGE
buildah --storage-driver=vfs manifest push --digestfile image-digest --authfile /.docker/config.json --all $OUTPUT_IMAGE
echo -n "$OUTPUT_IMAGE" | tee /tekton-results/IMAGE_URL
cat image-digest | tee /tekton-results/IMAGE_DIGEST
REMOTESSHEOF
Expand Down

0 comments on commit d3e3a21

Please sign in to comment.