osbuild: function for creating named pipeline tree inputs
Convenience function for creating a map with a single input pointing to a pipeline's tree with a given key. Different stages use different keys in the map (often "tree"). Functions will be added for each stage to create a map with the appropriate key when necessary.
This commit is contained in:
parent
58966e4b13
commit
ca0175c82b
1 changed files with 10 additions and 0 deletions
|
|
@ -18,3 +18,13 @@ func NewTreeInput(reference string) *TreeInput {
|
|||
input.References = []string{reference}
|
||||
return input
|
||||
}
|
||||
|
||||
type PipelineTreeInputs map[string]TreeInput
|
||||
|
||||
func NewPipelineTreeInputs(name, pipeline string) *PipelineTreeInputs {
|
||||
return &PipelineTreeInputs{
|
||||
name: *NewTreeInput("name:" + pipeline),
|
||||
}
|
||||
}
|
||||
|
||||
func (PipelineTreeInputs) isStageInputs() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue