From 25949dd5dc98efffcbb67769a94ee98599ce3575 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Wed, 28 Jun 2023 08:09:17 -0400 Subject: [PATCH] Add Hyper-V artifact https://github.com/coreos/fedora-coreos-tracker/issues/1424 Co-authored-by: Brent Baude --- docs/release-notes.md | 1 + release/release.go | 1 + release/translate.go | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index cd14f26..78167aa 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -4,6 +4,7 @@ Changes: +- Add support for Hyper-V images ## stream-metadata-go 0.4.2 (2023-06-01) diff --git a/release/release.go b/release/release.go index 9e60ae8..5864260 100644 --- a/release/release.go +++ b/release/release.go @@ -59,6 +59,7 @@ type Media struct { Digitalocean *PlatformBase `json:"digitalocean"` Exoscale *PlatformBase `json:"exoscale"` Gcp *PlatformGcp `json:"gcp"` + HyperV *PlatformBase `json:"hyperv"` Ibmcloud *PlatformIBMCloud `json:"ibmcloud"` KubeVirt *PlatformKubeVirt `json:"kubevirt"` Metal *PlatformBase `json:"metal"` diff --git a/release/translate.go b/release/translate.go index 2bd56be..9e559f6 100644 --- a/release/translate.go +++ b/release/translate.go @@ -159,6 +159,13 @@ func (releaseArch *Arch) toStreamArch(rel *Release) stream.Arch { */ } + if releaseArch.Media.HyperV != nil { + artifacts["hyperv"] = stream.PlatformArtifacts{ + Release: rel.Release, + Formats: mapFormats(releaseArch.Media.HyperV.Artifacts), + } + } + if releaseArch.Media.Ibmcloud != nil { artifacts["ibmcloud"] = stream.PlatformArtifacts{ Release: rel.Release,