tekton

package
v0.0.0-...-ce277f2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PipelineTypeRelease is the type for PipelineRuns created to run a release Pipeline
	PipelineTypeRelease = "release"
)

Variables

View Source
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

func InternalRequestPipelineRunSucceededPredicate() predicate.Predicate

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

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

WithOwner set's owner annotations to the InternalRequest PipelineRun.

func (*InternalRequestPipelineRun) WithPipeline

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL