Skip to content

Commit

Permalink
Add build artifact for Apple Hypervisor
Browse files Browse the repository at this point in the history
this pr introduces a build artifact for the Apple Hypervisor (applehv).
It is a qemu-variant in raw disk form and gzipped (macos has gz support
natively)

See coreos/fedora-coreos-tracker#1533 and coreos/fedora-coreos-tracker#1548

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude authored and dustymabe committed Aug 23, 2023
1 parent 0c97893 commit 3ac75dc
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/coreos-assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (
// commands we'd expect to use in the local dev path
var buildCommands = []string{"init", "fetch", "build", "run", "prune", "clean", "list"}
var advancedBuildCommands = []string{"buildfetch", "buildupload", "oc-adm-release", "push-container", "upload-oscontainer", "buildextend-extensions"}
var buildextendCommands = []string{"aliyun", "aws", "azure", "digitalocean", "exoscale", "extensions", "extensions-container", "gcp", "hashlist-experimental", "hyperv", "ibmcloud", "kubevirt", "legacy-oscontainer", "live", "metal", "metal4k", "nutanix", "openstack", "qemu", "secex", "virtualbox", "vmware", "vultr"}
var buildextendCommands = []string{"aliyun", "applehv", "aws", "azure", "digitalocean", "exoscale", "extensions", "extensions-container", "gcp", "hashlist-experimental", "hyperv", "ibmcloud", "kubevirt", "legacy-oscontainer", "live", "metal", "metal4k", "nutanix", "openstack", "qemu", "secex", "virtualbox", "vmware", "vultr"}

var utilityCommands = []string{"aws-replicate", "compress", "copy-container", "koji-upload", "kola", "push-container-manifest", "remote-build-container", "remote-prune", "remote-session", "sign", "tag", "update-variant"}
var otherCommands = []string{"shell", "meta"}

Expand Down
3 changes: 2 additions & 1 deletion pkg/builds/cosa_v1.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package builds

// generated by 'make schema'
// source hash: a5fec50536bd4c2eed006dfb897b3b40fdf50393a0e3e32edf874b4e200e4e4d
// source hash: 73eba405214212d41c92204c48cde7bede443c9815395676b5e9c52531d08a61

type AdvisoryDiff []AdvisoryDiffItems

Expand Down Expand Up @@ -84,6 +84,7 @@ type Build struct {

type BuildArtifacts struct {
Aliyun *Artifact `json:"aliyun,omitempty"`
AppleHv *Artifact `json:"applehv,omitempty"`
Aws *Artifact `json:"aws,omitempty"`
Azure *Artifact `json:"azure,omitempty"`
AzureStack *Artifact `json:"azurestack,omitempty"`
Expand Down
9 changes: 8 additions & 1 deletion pkg/builds/schema_doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by ./generate-schema.sh
// Source hash: a5fec50536bd4c2eed006dfb897b3b40fdf50393a0e3e32edf874b4e200e4e4d
// Source hash: 73eba405214212d41c92204c48cde7bede443c9815395676b5e9c52531d08a61
// DO NOT EDIT

package builds
Expand Down Expand Up @@ -449,6 +449,7 @@ var generatedSchemaJSON = `{
"ostree"
],
"optional": [
"applehv",
"aliyun",
"aws",
"azure",
Expand Down Expand Up @@ -621,6 +622,12 @@ var generatedSchemaJSON = `{
"title": "Vultr",
"$ref": "#/definitions/artifact"
},
"applehv": {
"$id": "#/properties/images/properties/applehv",
"type": "object",
"title": "AppleHV",
"$ref": "#/definitions/artifact"
},
"aliyun": {
"$id": "#/properties/images/properties/aliyun",
"type": "object",
Expand Down
1 change: 1 addition & 0 deletions src/cmd-buildextend-applehv
2 changes: 1 addition & 1 deletion src/cmd-generate-release-meta
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def append_build(out, input_):
# build the architectures dict
arch_dict = {"media": {}}
ensure_dup(input_, arch_dict, "ostree-commit", "commit")
platforms = ["aliyun", "aws", "azure", "azurestack", "digitalocean", "exoscale", "gcp", "hyperv", "ibmcloud", "kubevirt", "metal", "nutanix", "openstack", "powervs", "qemu", "virtualbox", "vmware", "vultr", "qemu-secex"]
platforms = ["aliyun", "applehv", "aws", "azure", "azurestack", "digitalocean", "exoscale", "gcp", "hyperv", "ibmcloud", "kubevirt", "metal", "nutanix", "openstack", "powervs", "qemu", "virtualbox", "vmware", "vultr", "qemu-secex"]
for platform in platforms:
if input_.get("images", {}).get(platform, None) is not None:
print(f" - {platform}")
Expand Down
6 changes: 6 additions & 0 deletions src/cosalib/qemuvariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"image_format": "qcow2",
"platform": "aliyun",
},
"applehv": {
"image_format": "raw",
"image_suffix": "raw.gz",
"platform": "applehv",
"compression": "gzip"
},
"azure": {
"image_format": "vpc",
"image_suffix": "vhd",
Expand Down
7 changes: 7 additions & 0 deletions src/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@
"ostree"
],
"optional": [
"applehv",
"aliyun",
"aws",
"azure",
Expand Down Expand Up @@ -615,6 +616,12 @@
"title": "Vultr",
"$ref": "#/definitions/artifact"
},
"applehv": {
"$id": "#/properties/images/properties/applehv",
"type": "object",
"title": "AppleHV",
"$ref": "#/definitions/artifact"
},
"aliyun": {
"$id": "#/properties/images/properties/aliyun",
"type": "object",
Expand Down

0 comments on commit 3ac75dc

Please sign in to comment.