The references field in org.osbuild.tree inputs currently supports one of three forms, all of which are functionally equivalent: - Array of one string - Array of one object with key "id" and string value - Single object with no properties (only key/name) We use the first form which is the simplest. The string should refer to a pipeline by name (as name:<pipelinename>), which means the input refer to the final tree of the named pipeline.
20 lines
546 B
Go
20 lines
546 B
Go
package osbuild
|
|
|
|
// Tree inputs
|
|
type TreeInput struct {
|
|
inputCommon
|
|
References []string `json:"references"`
|
|
}
|
|
|
|
func (TreeInput) isInput() {}
|
|
|
|
// NewTreeInput creates an org.osbuild.tree input for an osbuild stage.
|
|
// The input is the final tree from a pipeline that should be referenced as
|
|
// 'name:<pipelinename>' in the reference argument.
|
|
func NewTreeInput(reference string) *TreeInput {
|
|
input := new(TreeInput)
|
|
input.Type = "org.osbuild.tree"
|
|
input.Origin = "org.osbuild.pipeline"
|
|
input.References = []string{reference}
|
|
return input
|
|
}
|