Documentation ¶
Index ¶
- Constants
- Variables
- func GetResultsFromPipelineRun(pipelineRun *tektonv1beta1.PipelineRun) map[string]string
- func InternalRequestPipelineRunSucceededPredicate() predicate.Predicate
- type InternalRequestPipelineRun
- func (i *InternalRequestPipelineRun) AsPipelineRun() *tektonv1beta1.PipelineRun
- func (i *InternalRequestPipelineRun) WithInternalRequest(internalRequest *v1alpha1.InternalRequest) *InternalRequestPipelineRun
- func (i *InternalRequestPipelineRun) WithOwner(internalRequest *v1alpha1.InternalRequest) *InternalRequestPipelineRun
- func (i *InternalRequestPipelineRun) WithPipeline(pipeline *tektonv1beta1.Pipeline, ...) *InternalRequestPipelineRun
Constants ¶
const (
// PipelineTypeRelease is the type for PipelineRuns created to run a release Pipeline
PipelineTypeRelease = "release"
)
Variables ¶
var ( // InternalRequestNameLabel is the label used to specify the name of the internal request associated with the PipelineRun InternalRequestNameLabel = fmt.Sprintf("%s/%s", internalRequestLabelPrefix, "name") // InternalRequestNamespaceLabel is the label used to specify the namespace of the internal request associated with the PipelineRun InternalRequestNamespaceLabel = fmt.Sprintf("%s/%s", internalRequestLabelPrefix, "namespace") )
Functions ¶
func GetResultsFromPipelineRun ¶
func GetResultsFromPipelineRun(pipelineRun *tektonv1beta1.PipelineRun) map[string]string
GetResultsFromPipelineRun returns a map with all the results emitted by the given PipelineRun. Only string results are supported. Other type of results will be silently omitted.
func InternalRequestPipelineRunSucceededPredicate ¶
InternalRequestPipelineRunSucceededPredicate returns a predicate which filters out all objects except internal requests PipelineRuns which have just succeeded.
Types ¶
type InternalRequestPipelineRun ¶
type InternalRequestPipelineRun struct {
tektonv1beta1.PipelineRun
}
InternalRequestPipelineRun is a PipelineRun alias, so we can add new methods to it in this file.
func NewInternalRequestPipelineRun ¶
func NewInternalRequestPipelineRun(internalServicesConfig *v1alpha1.InternalServicesConfig) *InternalRequestPipelineRun
NewInternalRequestPipelineRun creates a PipelineRun for the given InternalRequest. The name will be autogenerated, using the name of the request as the prefix. The Pipeline information and namespace for the PipelineRun will be extracted from the given InternalServicesConfig.
func (*InternalRequestPipelineRun) AsPipelineRun ¶
func (i *InternalRequestPipelineRun) AsPipelineRun() *tektonv1beta1.PipelineRun
AsPipelineRun casts the InternalRequestPipelineRun to PipelineRun, so it can be used in the Kubernetes client.
func (*InternalRequestPipelineRun) WithInternalRequest ¶
func (i *InternalRequestPipelineRun) WithInternalRequest(internalRequest *v1alpha1.InternalRequest) *InternalRequestPipelineRun
WithInternalRequest appends the InternalRequest parameters to the PipelineRun passed as an argument and set labels referencing the InternalRequest.
func (*InternalRequestPipelineRun) WithOwner ¶
func (i *InternalRequestPipelineRun) WithOwner(internalRequest *v1alpha1.InternalRequest) *InternalRequestPipelineRun
WithOwner set's owner annotations to the InternalRequest PipelineRun.
func (*InternalRequestPipelineRun) WithPipeline ¶
func (i *InternalRequestPipelineRun) WithPipeline(pipeline *tektonv1beta1.Pipeline, internalServicesConfig *v1alpha1.InternalServicesConfig) *InternalRequestPipelineRun
WithPipeline sets a PipelineRef to point to the specified pipeline. It will also add a Workspace if the Pipeline requires one with a name matching the name of the VolumeClaim defined in the InternalServicesConfig.