manifest: make filename optional and generalise Tree
We have three kinds of operating system trees, until we unify them to one, hide them behind one interface. Use this to read the architecture from the Tree rather than pass it in as a string to parent pipelines. Also, make the filename parameter optional in a few places, there should be no reason to set this rather than introspect it (except for backwards compatibility). Lastly, add another playground example sample to build a raw image.
This commit is contained in:
parent
d00b98c134
commit
e844453c85
17 changed files with 307 additions and 143 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
||||
"github.com/osbuild/osbuild-composer/internal/platform"
|
||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
)
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ type OSTreeCommitServer struct {
|
|||
// TODO: should this be configurable?
|
||||
Language string
|
||||
|
||||
platform platform.Platform
|
||||
repos []rpmmd.RepoConfig
|
||||
packageSpecs []rpmmd.PackageSpec
|
||||
commitPipeline *OSTreeCommit
|
||||
|
|
@ -34,12 +36,14 @@ type OSTreeCommitServer struct {
|
|||
// nginx will be listening on.
|
||||
func NewOSTreeCommitServer(m *Manifest,
|
||||
buildPipeline *Build,
|
||||
platform platform.Platform,
|
||||
repos []rpmmd.RepoConfig,
|
||||
commitPipeline *OSTreeCommit,
|
||||
nginxConfigPath,
|
||||
listenPort string) *OSTreeCommitServer {
|
||||
p := &OSTreeCommitServer{
|
||||
Base: NewBase(m, "container-tree", buildPipeline),
|
||||
platform: platform,
|
||||
repos: repos,
|
||||
commitPipeline: commitPipeline,
|
||||
nginxConfigPath: nginxConfigPath,
|
||||
|
|
@ -139,3 +143,7 @@ func chmodStageOptions(path, mode string, recursive bool) *osbuild2.ChmodStageOp
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (p *OSTreeCommitServer) GetPlatform() platform.Platform {
|
||||
return p.platform
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue