manifest: use call-by-reference in pipeline interface

This allows interface methods to modify the state of the pipeline
objects. We will use this in subsequent patches.
This commit is contained in:
Tom Gundersen 2022-06-28 23:32:17 +01:00
parent d0fa58bb2d
commit 0743eb2f81
14 changed files with 73 additions and 73 deletions

View file

@ -16,15 +16,15 @@ 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 {
return OSTreeCommitPipeline{
func NewOSTreeCommitPipeline(buildPipeline *BuildPipeline, treePipeline *OSPipeline, ref string) *OSTreeCommitPipeline {
return &OSTreeCommitPipeline{
BasePipeline: NewBasePipeline("ostree-commit", buildPipeline, nil),
treePipeline: treePipeline,
ref: ref,
}
}
func (p OSTreeCommitPipeline) serialize() osbuild2.Pipeline {
func (p *OSTreeCommitPipeline) serialize() osbuild2.Pipeline {
pipeline := p.BasePipeline.serialize()
pipeline.AddStage(osbuild2.NewOSTreeInitStage(&osbuild2.OSTreeInitStageOptions{Path: "/repo"}))