Skip to content

Commit 616c1dc

Browse files
committed
osbuild/hyperv: run through zip
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
1 parent b70df75 commit 616c1dc

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

src/cmd-osbuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dn=$(dirname "$0")
1010
declare -A SUPPORTED_PLATFORMS=(
1111
['applehv']='raw.gz'
1212
['gcp']='tar.gz'
13-
['hyperv']='vhdx'
13+
['hyperv']='vhdx.zip'
1414
['metal4k']='raw'
1515
['metal']='raw'
1616
['qemu']='qcow2'
@@ -360,7 +360,7 @@ main() {
360360

361361
# Perform postprocessing
362362
case "$platform" in
363-
applehv|gcp)
363+
applehv|gcp|hyperv)
364364
# Update the meta.json and builddir with the generated artifact.
365365
# Skip Compression on these platforms as they are already compressed.
366366
postprocess_artifact "${platform}" "${imgpath}" "${imgname}" 'True'

src/osbuild-manifests/platform.hyperv.ipp.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pipelines:
5151
partition:
5252
mpp-format-int: '{image.layout[''boot''].partnum}'
5353
target: /boot
54-
- name: hyperv
54+
- name: raw-hyperv-image-vhdx
5555
build:
5656
mpp-format-string: '{qemu_stage_buildroot}'
5757
stages:
@@ -68,3 +68,18 @@ pipelines:
6868
mpp-format-string: '{artifact_name_prefix}-hyperv.{arch}.vhdx'
6969
format:
7070
type: vhdx
71+
- name: hyperv
72+
build:
73+
mpp-format-string: '{qemu_stage_buildroot}'
74+
stages:
75+
- type: org.osbuild.zip
76+
inputs:
77+
tree:
78+
type: org.osbuild.tree
79+
origin: org.osbuild.pipeline
80+
references:
81+
- name:raw-hyperv-image-vhdx
82+
options:
83+
level: 9
84+
filename:
85+
mpp-format-string: '{artifact_name_prefix}-hyperv.{arch}.vhdx.zip'

src/vmdeps.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tar
3737
podman
3838

3939
# For running osbuild
40-
osbuild osbuild-ostree osbuild-selinux osbuild-tools python3-pyrsistent
40+
osbuild osbuild-ostree osbuild-selinux osbuild-tools python3-pyrsistent zip
4141

4242
# For resetting the terminal inside supermin shell
4343
/usr/bin/reset

0 commit comments

Comments
 (0)