manifest: implicitly track pipelines in manifest

Pipelines are now added to their manifest on creation, and we
ensure that dependants are associated with the same manifest.
This commit is contained in:
Tom Gundersen 2022-06-29 20:53:02 +01:00
parent 28b8a790b5
commit 4961a17ba8
17 changed files with 181 additions and 101 deletions

View file

@ -30,20 +30,25 @@ type OSTreeCommitServerTreePipeline struct {
// is a pipeline producing an ostree commit to be served. nginxConfigPath
// is the path to the main nginx config file and listenPort is the port
// nginx will be listening on.
func NewOSTreeCommitServerTreePipeline(buildPipeline *BuildPipeline,
func NewOSTreeCommitServerTreePipeline(m *Manifest,
buildPipeline *BuildPipeline,
repos []rpmmd.RepoConfig,
commitPipeline *OSTreeCommitPipeline,
nginxConfigPath,
listenPort string) *OSTreeCommitServerTreePipeline {
p := &OSTreeCommitServerTreePipeline{
BasePipeline: NewBasePipeline("container-tree", buildPipeline, nil),
BasePipeline: NewBasePipeline(m, "container-tree", buildPipeline, nil),
repos: repos,
commitPipeline: commitPipeline,
nginxConfigPath: nginxConfigPath,
listenPort: listenPort,
Language: "en_US",
}
if commitPipeline.BasePipeline.manifest != m {
panic("commit pipeline from different manifest")
}
buildPipeline.addDependent(p)
m.addPipeline(p)
return p
}