manifest: attach unresolved Content to Manifest struct

Add Content to the Manifest struct to represent unresolved packages,
container, and ostree commit specs that the caller should resolve before
serialising the manifest.
This commit is contained in:
Achilleas Koutsou 2023-04-27 20:01:16 +02:00 committed by Simon de Vlieger
parent 12e8ab3ac6
commit 8b46ead31b

View file

@ -47,8 +47,33 @@ func (m *OSBuildManifest) UnmarshalJSON(payload []byte) error {
return nil
}
// Manifest represents a manifest initialised with all the information required
// to generate the pipelines but no content. The content included in the
// Content field must be resolved before serializing.
type Manifest struct {
pipelines []Pipeline
// Content for the image that will be built by the Manifest. Each content
// type should be resolved before passing to the Serialize method.
Content Content
}
// Content for the image that will be built by the Manifest. Each content type
// should be resolved before passing to the Serialize method.
type Content struct {
// PackageSets are sequences of package sets, each set consisting of a list
// of package names to include and exclude and a set of repositories to use
// for resolving. Package set sequences (chains) should be depsolved in
// separately and the result combined. Package set sequences (chains) are
// keyed by the name of the Pipeline that will install them.
PackageSets map[string][]rpmmd.PackageSet
// Containers are source specifications for containers to embed in the image.
Containers []container.SourceSpec
// OSTreeCommits are source specifications for ostree commits to embed in
// the image or use as parent commits when building a new one.
OSTreeCommits []ostree.SourceSpec
}
func New() Manifest {