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:
parent
28b8a790b5
commit
4961a17ba8
17 changed files with 181 additions and 101 deletions
|
|
@ -16,13 +16,20 @@ type OSTreeCommitPipeline struct {
|
|||
// NewOSTreeCommitPipeline creates a new OSTree commit pipeline. The
|
||||
// treePipeline is the tree representing the content of the commit.
|
||||
// ref is the ref to create the commit under.
|
||||
func NewOSTreeCommitPipeline(buildPipeline *BuildPipeline, treePipeline *OSPipeline, ref string) *OSTreeCommitPipeline {
|
||||
func NewOSTreeCommitPipeline(m *Manifest,
|
||||
buildPipeline *BuildPipeline,
|
||||
treePipeline *OSPipeline,
|
||||
ref string) *OSTreeCommitPipeline {
|
||||
p := &OSTreeCommitPipeline{
|
||||
BasePipeline: NewBasePipeline("ostree-commit", buildPipeline, nil),
|
||||
BasePipeline: NewBasePipeline(m, "ostree-commit", buildPipeline, nil),
|
||||
treePipeline: treePipeline,
|
||||
ref: ref,
|
||||
}
|
||||
if treePipeline.BasePipeline.manifest != m {
|
||||
panic("tree pipeline from different manifest")
|
||||
}
|
||||
buildPipeline.addDependent(p)
|
||||
m.addPipeline(p)
|
||||
return p
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue