Skip to content

Commit

Permalink
cmd/gen-manifests: fix compilation with the latest images
Browse files Browse the repository at this point in the history
The latest images introduced a new blueprint option: minimal. Since we use
direct type-conversion, we need to add it also in gen-manifests. A warning
is also added, since this feature is considered experimental.

Signed-off-by: Ondřej Budai <[email protected]>
  • Loading branch information
ondrejbudai committed Oct 10, 2023
1 parent 19edaca commit b228886
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/gen-manifests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/osbuild/images/pkg/ostree"
"github.com/osbuild/images/pkg/rhsm/facts"
"github.com/osbuild/images/pkg/rpmmd"

"github.com/osbuild/osbuild-composer/internal/dnfjson"
)

Expand Down Expand Up @@ -73,6 +74,9 @@ type crBlueprint struct {
Containers []blueprint.Container `json:"containers,omitempty"`
Customizations *blueprint.Customizations `json:"customizations,omitempty"`
Distro string `json:"distro,omitempty"`

// EXPERIMENTAL
Minimal bool `json:"minimal,omitempty"`
}

type composeRequest struct {
Expand Down Expand Up @@ -150,6 +154,9 @@ func makeManifestJob(name string, imgType distro.ImageType, cr composeRequest, d
var bp blueprint.Blueprint
if cr.Blueprint != nil {
bp = blueprint.Blueprint(*cr.Blueprint)
if bp.Minimal {
msgq <- fmt.Sprintf("[%s] blueprint contains minimal=true, this is considered EXPERIMENTAL", filename)
}
}

manifest, _, err := imgType.Manifest(&bp, options, repos, seedArg)
Expand Down

0 comments on commit b228886

Please sign in to comment.