Skip to content

Commit

Permalink
osbuild/hyperv: run through zip
Browse files Browse the repository at this point in the history
The artifact we create in the pipeline today is .vhdx.zip. Let's
build on the work upstream in [1] and use the new OSBuild zip stage
to encapsulate the artifact.

[1] osbuild/osbuild@ac8a2a4
  • Loading branch information
dustymabe committed Nov 13, 2024
1 parent 134cd42 commit af630d1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cmd-osbuild
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dn=$(dirname "$0")
declare -A SUPPORTED_PLATFORMS=(
['applehv']='raw.gz'
['gcp']='tar.gz'
['hyperv']='vhdx'
['hyperv']='vhdx.zip'
['metal4k']='raw'
['metal']='raw'
['qemu']='qcow2'
Expand Down Expand Up @@ -360,7 +360,7 @@ main() {

# Perform postprocessing
case "$platform" in
applehv|gcp)
applehv|gcp|hyperv)
# Update the meta.json and builddir with the generated artifact.
# Skip Compression on these platforms as they are already compressed.
postprocess_artifact "${platform}" "${imgpath}" "${imgname}" 'True'
Expand Down
17 changes: 16 additions & 1 deletion src/osbuild-manifests/platform.hyperv.ipp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pipelines:
partition:
mpp-format-int: '{image.layout[''boot''].partnum}'
target: /boot
- name: hyperv
- name: raw-hyperv-image-vhdx
build:
mpp-format-string: '{qemu_stage_buildroot}'
stages:
Expand All @@ -68,3 +68,18 @@ pipelines:
mpp-format-string: '{artifact_name_prefix}-hyperv.{arch}.vhdx'
format:
type: vhdx
- name: hyperv
build:
mpp-format-string: '{qemu_stage_buildroot}'
stages:
- type: org.osbuild.zip
inputs:
tree:
type: org.osbuild.tree
origin: org.osbuild.pipeline
references:
- name:raw-hyperv-image-vhdx
options:
level: 9
filename:
mpp-format-string: '{artifact_name_prefix}-hyperv.{arch}.vhdx.zip'
2 changes: 1 addition & 1 deletion src/vmdeps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tar
podman

# For running osbuild
osbuild osbuild-ostree osbuild-selinux osbuild-tools python3-pyrsistent
osbuild osbuild-ostree osbuild-selinux osbuild-tools python3-pyrsistent zip

# For resetting the terminal inside supermin shell
/usr/bin/reset
Expand Down

0 comments on commit af630d1

Please sign in to comment.