Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(pd *PipelineDefinition, hook scm.Webhook, generateName string) (*pipelinev1.PipelineRun, error)
Execute takes a PipelineDefinition and a hook, and returns a PipelineRun and possibly an error.
The Filter on the definition is evaluated, and if it returns true, then the ParamBindings are evaluated and appended to the PipelineRunSpec's Params.
Finally a PipelineRun is returned, populated with the spec from the definition.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the http.Handler interface, it grabs pipeline configurations from the incoming Hook's repository and attempts to generate a PipelineRun from them.
type ParamBinding ¶
ParamBinding represents a name and CEL expression that's used when generating a PipelineRun from the spec.
These are converted to Params, and added to the list of params already provided by the PipelineRunSpec.
type PipelineDefinition ¶
type PipelineDefinition struct { Filter string `yaml:"expression"` ParamBindings []ParamBinding `yaml:"param_bindings"` PipelineRunSpec pipelinev1.PipelineRunSpec `yaml:"pipeline_run_spec"` }
PipelineDefinition represents the YAML that defines a PipelineRun when handing events.