v1beta1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 25 Imported by: 410

Documentation

Overview

nolint: golint

Package v1beta1 contains API Schema definitions for the pipeline v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/tektoncd/pipeline/pkg/apis/pipeline +k8s:defaulter-gen=TypeMeta +groupName=tekton.dev

nolint: golint

nolint: golint

nolint: golint

nolint: golint

Index

Constants

View Source
const (

	// ResultTaskPart Constant used to define the "tasks" part of a pipeline result reference
	ResultTaskPart = "tasks"
	// ResultResultPart Constant used to define the "results" part of a pipeline result reference
	ResultResultPart = "results"

	// ResultNameFormat Constant used to define the the regex Result.Name should follow
	ResultNameFormat = `^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`
)
View Source
const (
	// TaskRunSpecStatusCancelled indicates that the user wants to cancel the task,
	// if not already cancelled or terminated
	TaskRunSpecStatusCancelled = "TaskRunCancelled"

	// TaskRunReasonCancelled indicates that the TaskRun has been cancelled
	// because it was requested so by the user
	TaskRunReasonCancelled = "TaskRunCancelled"
)
View Source
const (
	// ConditionTypeConvertible is a Warning condition that is set on
	// resources when they cannot be converted to warn of a forthcoming
	// breakage.
	ConditionTypeConvertible apis.ConditionType = "Convertible"
)
View Source
const (
	// PipelineRunSpecStatusCancelled indicates that the user wants to cancel the task,
	// if not already cancelled or terminated
	PipelineRunSpecStatusCancelled = "PipelineRunCancelled"
)

Variables

View Source
var (

	// AddToScheme adds Build types to the scheme.
	AddToScheme = schemeBuilder.AddToScheme
)

AllParamTypes can be used for ParamType validation.

View Source
var AllResourceTypes = resource.AllResourceTypes

AllResourceTypes can be used for validation to check if a provided Resource type is one of the known types.

View Source
var (
	AllowedOutputResources = resource.AllowedOutputResources
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: pipeline.GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects

Functions

func ApplyArrayReplacements

func ApplyArrayReplacements(in string, stringReplacements map[string]string, arrayReplacements map[string][]string) []string

Take an input string, and output an array of strings related to possible arrayReplacements. If there aren't any areas where the input can be split up via arrayReplacements, then just return an array with a single element, which is ApplyReplacements(in, replacements).

func ApplyContainerReplacements added in v0.13.0

func ApplyContainerReplacements(step *corev1.Container, stringReplacements map[string]string, arrayReplacements map[string][]string)

func ApplyReplacements

func ApplyReplacements(in string, replacements map[string]string) string

func ApplyStepReplacements added in v0.13.0

func ApplyStepReplacements(step *Step, stringReplacements map[string]string, arrayReplacements map[string][]string)

func ApplyTaskModifier

func ApplyTaskModifier(ts *TaskSpec, tm TaskModifier) error

ApplyTaskModifier applies a modifier to the task by appending and prepending steps and volumes. If steps with the same name exist in ts an error will be returned. If identical Volumes have been added, they will not be added again. If Volumes with the same name but different contents have been added, an error will be returned.

func ConvertErrorf

func ConvertErrorf(field, msg string, args ...interface{}) error

ConvertErrorf creates a CannotConvertError from the field name and format string.

func GetVarSubstitutionExpressionsForParam added in v0.11.3

func GetVarSubstitutionExpressionsForParam(param Param) ([]string, bool)

GetVarSubstitutionExpressionsForParam extracts all the value between "$(" and ")"" for a parameter

func GetVarSubstitutionExpressionsForPipelineResult added in v0.12.0

func GetVarSubstitutionExpressionsForPipelineResult(result PipelineResult) ([]string, bool)

GetVarSubstitutionExpressionsForPipelineResult extracts all the value between "$(" and ")"" for a pipeline result

func InputResourcePath added in v0.13.0

func InputResourcePath(r ResourceDeclaration) string

InputResourcePath returns the path where the given input resource will get mounted in a Pod

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func LooksLikeContainsResultRefs

func LooksLikeContainsResultRefs(expressions []string) bool

LooksLikeContainsResultRefs attempts to check if param or a pipeline result looks like it contains any result references. This is useful if we want to make sure the param looks like a ResultReference before performing strict validation

func OutputResourcePath added in v0.13.0

func OutputResourcePath(r ResourceDeclaration) string

OutputResourcePath returns the path to the output resouce in a Pod

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ValidateDeclaredWorkspaces

func ValidateDeclaredWorkspaces(workspaces []WorkspaceDeclaration, steps []Step, stepTemplate *corev1.Container) *apis.FieldError

a mount path which conflicts with any other declared workspaces, with the explicitly declared volume mounts, or with the stepTemplate. The names must also be unique.

func ValidateParameterTypes

func ValidateParameterTypes(params []ParamSpec) *apis.FieldError

func ValidateParameterVariables

func ValidateParameterVariables(steps []Step, params []ParamSpec) *apis.FieldError

func ValidateResourcesVariables

func ValidateResourcesVariables(steps []Step, resources *TaskResources) *apis.FieldError

func ValidateResults added in v0.12.0

func ValidateResults(results []TaskResult) *apis.FieldError

func ValidateVariable

func ValidateVariable(name, value, prefix, contextPrefix, locationName, path string, vars map[string]struct{}) *apis.FieldError

func ValidateVariableIsolated

func ValidateVariableIsolated(name, value, prefix, contextPrefix, locationName, path string, vars map[string]struct{}) *apis.FieldError

Verifies that variables matching the relevant string expressions are completely isolated if present.

func ValidateVariableProhibited

func ValidateVariableProhibited(name, value, prefix, contextPrefix, locationName, path string, vars map[string]struct{}) *apis.FieldError

Verifies that variables matching the relevant string expressions do not reference any of the names present in vars.

func ValidateVolumes

func ValidateVolumes(volumes []corev1.Volume) *apis.FieldError

Types

type ArrayOrString

type ArrayOrString struct {
	Type      ParamType // Represents the stored type of ArrayOrString.
	StringVal string
	ArrayVal  []string
}

ArrayOrString is a type that can hold a single string or string array. Used in JSON unmarshalling so that a single JSON field can accept either an individual string or an array of strings.

func NewArrayOrString

func NewArrayOrString(value string, values ...string) ArrayOrString

NewArrayOrString creates an ArrayOrString of type ParamTypeString or ParamTypeArray, based on how many inputs are given (>1 input will create an array, not string).

func (*ArrayOrString) ApplyReplacements

func (arrayOrString *ArrayOrString) ApplyReplacements(stringReplacements map[string]string, arrayReplacements map[string][]string)

ApplyReplacements applyes replacements for ArrayOrString type

func (*ArrayOrString) DeepCopy

func (in *ArrayOrString) DeepCopy() *ArrayOrString

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArrayOrString.

func (*ArrayOrString) DeepCopyInto

func (in *ArrayOrString) DeepCopyInto(out *ArrayOrString)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ArrayOrString) MarshalJSON

func (arrayOrString ArrayOrString) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (*ArrayOrString) UnmarshalJSON

func (arrayOrString *ArrayOrString) UnmarshalJSON(value []byte) error

UnmarshalJSON implements the json.Unmarshaller interface.

type CannotConvertError

type CannotConvertError struct {
	Message string
	Field   string
}

CannotConvertError is returned when a field cannot be converted.

func (*CannotConvertError) DeepCopy

func (in *CannotConvertError) DeepCopy() *CannotConvertError

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CannotConvertError.

func (*CannotConvertError) DeepCopyInto

func (in *CannotConvertError) DeepCopyInto(out *CannotConvertError)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CannotConvertError) Error

func (cce *CannotConvertError) Error() string

Error implements error

type CloudEventCondition

type CloudEventCondition string

CloudEventCondition is a string that represents the condition of the event.

const (
	// CloudEventConditionUnknown means that the condition for the event to be
	// triggered was not met yet, or we don't know the state yet.
	CloudEventConditionUnknown CloudEventCondition = "Unknown"
	// CloudEventConditionSent means that the event was sent successfully
	CloudEventConditionSent CloudEventCondition = "Sent"
	// CloudEventConditionFailed means that there was one or more attempts to
	// send the event, and none was successful so far.
	CloudEventConditionFailed CloudEventCondition = "Failed"
)

type CloudEventDelivery

type CloudEventDelivery struct {
	// Target points to an addressable
	Target string                  `json:"target,omitempty"`
	Status CloudEventDeliveryState `json:"status,omitempty"`
}

CloudEventDelivery is the target of a cloud event along with the state of delivery.

func (*CloudEventDelivery) DeepCopy

func (in *CloudEventDelivery) DeepCopy() *CloudEventDelivery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudEventDelivery.

func (*CloudEventDelivery) DeepCopyInto

func (in *CloudEventDelivery) DeepCopyInto(out *CloudEventDelivery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloudEventDeliveryState

type CloudEventDeliveryState struct {
	// Current status
	Condition CloudEventCondition `json:"condition,omitempty"`
	// SentAt is the time at which the last attempt to send the event was made
	// +optional
	SentAt *metav1.Time `json:"sentAt,omitempty"`
	// Error is the text of error (if any)
	Error string `json:"message"`
	// RetryCount is the number of attempts of sending the cloud event
	RetryCount int32 `json:"retryCount"`
}

CloudEventDeliveryState reports the state of a cloud event to be sent.

func (*CloudEventDeliveryState) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudEventDeliveryState.

func (*CloudEventDeliveryState) DeepCopyInto

func (in *CloudEventDeliveryState) DeepCopyInto(out *CloudEventDeliveryState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterTask

type ClusterTask struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec holds the desired state of the Task from the client
	// +optional
	Spec TaskSpec `json:"spec,omitempty"`
}

ClusterTask is a Task with a cluster scope. ClusterTasks are used to represent Tasks that should be publicly addressable from any namespace in the cluster.

func (*ClusterTask) ConvertFrom added in v0.12.0

func (sink *ClusterTask) ConvertFrom(ctx context.Context, source apis.Convertible) error

ConvertFrom implements api.Convertible

func (*ClusterTask) ConvertTo added in v0.12.0

func (source *ClusterTask) ConvertTo(ctx context.Context, sink apis.Convertible) error

ConvertTo implements api.Convertible

func (*ClusterTask) Copy

func (t *ClusterTask) Copy() TaskInterface

func (*ClusterTask) DeepCopy

func (in *ClusterTask) DeepCopy() *ClusterTask

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTask.

func (*ClusterTask) DeepCopyInto

func (in *ClusterTask) DeepCopyInto(out *ClusterTask)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterTask) DeepCopyObject

func (in *ClusterTask) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ClusterTask) SetDefaults

func (t *ClusterTask) SetDefaults(ctx context.Context)

func (*ClusterTask) TaskMetadata

func (t *ClusterTask) TaskMetadata() metav1.ObjectMeta

func (*ClusterTask) TaskSpec

func (t *ClusterTask) TaskSpec() TaskSpec

func (*ClusterTask) Validate

func (t *ClusterTask) Validate(ctx context.Context) *apis.FieldError

type ClusterTaskList

type ClusterTaskList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterTask `json:"items"`
}

ClusterTaskList contains a list of ClusterTask

func (*ClusterTaskList) DeepCopy

func (in *ClusterTaskList) DeepCopy() *ClusterTaskList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTaskList.

func (*ClusterTaskList) DeepCopyInto

func (in *ClusterTaskList) DeepCopyInto(out *ClusterTaskList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterTaskList) DeepCopyObject

func (in *ClusterTaskList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConditionCheck added in v0.13.0

type ConditionCheck TaskRun

ConditionCheck represents a single evaluation of a Condition step.

func NewConditionCheck added in v0.13.0

func NewConditionCheck(tr *TaskRun) *ConditionCheck

func (*ConditionCheck) DeepCopy added in v0.13.0

func (in *ConditionCheck) DeepCopy() *ConditionCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionCheck.

func (*ConditionCheck) DeepCopyInto added in v0.13.0

func (in *ConditionCheck) DeepCopyInto(out *ConditionCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConditionCheck) IsDone added in v0.13.0

func (cc *ConditionCheck) IsDone() bool

IsDone returns true if the ConditionCheck's status indicates that it is done.

func (*ConditionCheck) IsSuccessful added in v0.13.0

func (cc *ConditionCheck) IsSuccessful() bool

IsSuccessful returns true if the ConditionCheck's status indicates that it is done.

type ConditionCheckStatus

type ConditionCheckStatus struct {
	duckv1beta1.Status `json:",inline"`

	// ConditionCheckStatusFields inlines the status fields.
	ConditionCheckStatusFields `json:",inline"`
}

ConditionCheckStatus defines the observed state of ConditionCheck

func (*ConditionCheckStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionCheckStatus.

func (*ConditionCheckStatus) DeepCopyInto

func (in *ConditionCheckStatus) DeepCopyInto(out *ConditionCheckStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionCheckStatusFields

type ConditionCheckStatusFields struct {
	// PodName is the name of the pod responsible for executing this condition check.
	PodName string `json:"podName"`

	// StartTime is the time the check is actually started.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is the time the check pod completed.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Check describes the state of the check container.
	// +optional
	Check corev1.ContainerState `json:"check,omitempty"`
}

ConditionCheckStatusFields holds the fields of ConfigurationCheck's status. This is defined separately and inlined so that other types can readily consume these fields via duck typing.

func (*ConditionCheckStatusFields) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionCheckStatusFields.

func (*ConditionCheckStatusFields) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InternalTaskModifier

type InternalTaskModifier struct {
	StepsToPrepend []Step
	StepsToAppend  []Step
	Volumes        []v1.Volume
}

InternalTaskModifier implements TaskModifier for resources that are built-in to Tekton Pipelines.

func (*InternalTaskModifier) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalTaskModifier.

func (*InternalTaskModifier) DeepCopyInto

func (in *InternalTaskModifier) DeepCopyInto(out *InternalTaskModifier)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InternalTaskModifier) GetStepsToAppend

func (tm *InternalTaskModifier) GetStepsToAppend() []Step

GetStepsToAppend returns a set of Steps to append to the Task.

func (*InternalTaskModifier) GetStepsToPrepend

func (tm *InternalTaskModifier) GetStepsToPrepend() []Step

GetStepsToPrepend returns a set of Steps to prepend to the Task.

func (*InternalTaskModifier) GetVolumes

func (tm *InternalTaskModifier) GetVolumes() []v1.Volume

GetVolumes returns a set of Volumes to prepend to the Task pod.

type Param

type Param struct {
	Name  string        `json:"name"`
	Value ArrayOrString `json:"value"`
}

Param declares an ArrayOrString to use for the parameter called name.

func (*Param) DeepCopy

func (in *Param) DeepCopy() *Param

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Param.

func (*Param) DeepCopyInto

func (in *Param) DeepCopyInto(out *Param)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ParamSpec

type ParamSpec struct {
	// Name declares the name by which a parameter is referenced.
	Name string `json:"name"`
	// Type is the user-specified type of the parameter. The possible types
	// are currently "string" and "array", and "string" is the default.
	// +optional
	Type ParamType `json:"type,omitempty"`
	// Description is a user-facing description of the parameter that may be
	// used to populate a UI.
	// +optional
	Description string `json:"description,omitempty"`
	// Default is the value a parameter takes if no input value is supplied. If
	// default is set, a Task may be executed without a supplied value for the
	// parameter.
	// +optional
	Default *ArrayOrString `json:"default,omitempty"`
}

ParamSpec defines arbitrary parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun.

func (*ParamSpec) DeepCopy

func (in *ParamSpec) DeepCopy() *ParamSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamSpec.

func (*ParamSpec) DeepCopyInto

func (in *ParamSpec) DeepCopyInto(out *ParamSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ParamSpec) SetDefaults

func (pp *ParamSpec) SetDefaults(ctx context.Context)

SetDefaults set the default type

type ParamType

type ParamType string

ParamType indicates the type of an input parameter; Used to distinguish between a single string and an array of strings.

const (
	ParamTypeString ParamType = "string"
	ParamTypeArray  ParamType = "array"
)

Valid ParamTypes:

type Pipeline

type Pipeline struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec holds the desired state of the Pipeline from the client
	// +optional
	Spec PipelineSpec `json:"spec"`
}

Pipeline describes a list of Tasks to execute. It expresses how outputs of tasks feed into inputs of subsequent tasks. +k8s:openapi-gen=true

func (*Pipeline) ConvertFrom added in v0.12.0

func (sink *Pipeline) ConvertFrom(ctx context.Context, source apis.Convertible) error

ConvertFrom implements api.Convertible

func (*Pipeline) ConvertTo added in v0.12.0

func (source *Pipeline) ConvertTo(ctx context.Context, sink apis.Convertible) error

func (*Pipeline) Copy

func (p *Pipeline) Copy() PipelineInterface

func (*Pipeline) DeepCopy

func (in *Pipeline) DeepCopy() *Pipeline

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pipeline.

func (*Pipeline) DeepCopyInto

func (in *Pipeline) DeepCopyInto(out *Pipeline)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Pipeline) DeepCopyObject

func (in *Pipeline) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Pipeline) PipelineMetadata

func (p *Pipeline) PipelineMetadata() metav1.ObjectMeta

func (*Pipeline) PipelineSpec

func (p *Pipeline) PipelineSpec() PipelineSpec

func (*Pipeline) SetDefaults

func (p *Pipeline) SetDefaults(ctx context.Context)

func (*Pipeline) Validate

func (p *Pipeline) Validate(ctx context.Context) *apis.FieldError

Validate checks that the Pipeline structure is valid but does not validate that any references resources exist, that is done at run time.

type PipelineDeclaredResource

type PipelineDeclaredResource struct {
	// Name is the name that will be used by the Pipeline to refer to this resource.
	// It does not directly correspond to the name of any PipelineResources Task
	// inputs or outputs, and it does not correspond to the actual names of the
	// PipelineResources that will be bound in the PipelineRun.
	Name string `json:"name"`
	// Type is the type of the PipelineResource.
	Type PipelineResourceType `json:"type"`
	// Optional declares the resource as optional.
	// optional: true - the resource is considered optional
	// optional: false - the resource is considered required (default/equivalent of not specifying it)
	Optional bool `json:"optional,omitempty"`
}

PipelineDeclaredResource is used by a Pipeline to declare the types of the PipelineResources that it will required to run and names which can be used to refer to these PipelineResources in PipelineTaskResourceBindings.

func (*PipelineDeclaredResource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineDeclaredResource.

func (*PipelineDeclaredResource) DeepCopyInto

func (in *PipelineDeclaredResource) DeepCopyInto(out *PipelineDeclaredResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineInterface

type PipelineInterface interface {
	PipelineMetadata() metav1.ObjectMeta
	PipelineSpec() PipelineSpec
	Copy() PipelineInterface
}

PipelineInterface is implemented by Pipeline and ClusterPipeline

type PipelineList

type PipelineList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Pipeline `json:"items"`
}

PipelineList contains a list of Pipeline

func (*PipelineList) DeepCopy

func (in *PipelineList) DeepCopy() *PipelineList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineList.

func (*PipelineList) DeepCopyInto

func (in *PipelineList) DeepCopyInto(out *PipelineList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PipelineList) DeepCopyObject

func (in *PipelineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PipelineRef

type PipelineRef struct {
	// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name,omitempty"`
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

PipelineRef can be used to refer to a specific instance of a Pipeline. Copied from CrossVersionObjectReference: https://github.com/kubernetes/kubernetes/blob/169df7434155cbbc22f1532cba8e0a9588e29ad8/pkg/apis/autoscaling/types.go#L64

func (*PipelineRef) DeepCopy

func (in *PipelineRef) DeepCopy() *PipelineRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRef.

func (*PipelineRef) DeepCopyInto

func (in *PipelineRef) DeepCopyInto(out *PipelineRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineResourceBinding

type PipelineResourceBinding struct {
	// Name is the name of the PipelineResource in the Pipeline's declaration
	Name string `json:"name,omitempty"`
	// ResourceRef is a reference to the instance of the actual PipelineResource
	// that should be used
	// +optional
	ResourceRef *PipelineResourceRef `json:"resourceRef,omitempty"`

	// ResourceSpec is specification of a resource that should be created and
	// consumed by the task
	// +optional
	ResourceSpec *resource.PipelineResourceSpec `json:"resourceSpec,omitempty"`
}

PipelineResourceBinding connects a reference to an instance of a PipelineResource with a PipelineResource dependency that the Pipeline has declared

func (*PipelineResourceBinding) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceBinding.

func (*PipelineResourceBinding) DeepCopyInto

func (in *PipelineResourceBinding) DeepCopyInto(out *PipelineResourceBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineResourceInterface added in v0.13.0

type PipelineResourceInterface interface {
	// GetName returns the name of this PipelineResource instance.
	GetName() string
	// GetType returns the type of this PipelineResource (often a super type, e.g. in the case of storage).
	GetType() PipelineResourceType
	// Replacements returns all the attributes that this PipelineResource has that
	// can be used for variable replacement.
	Replacements() map[string]string
	// GetOutputTaskModifier returns the TaskModifier instance that should be used on a Task
	// in order to add this kind of resource when it is being used as an output.
	GetOutputTaskModifier(ts *TaskSpec, path string) (TaskModifier, error)
	// GetInputTaskModifier returns the TaskModifier instance that should be used on a Task
	// in order to add this kind of resource when it is being used as an input.
	GetInputTaskModifier(ts *TaskSpec, path string) (TaskModifier, error)
}

PipelineResourceInterface interface to be implemented by different PipelineResource types

type PipelineResourceRef

type PipelineResourceRef struct {
	// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name,omitempty"`
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

PipelineResourceRef can be used to refer to a specific instance of a Resource

func (*PipelineResourceRef) DeepCopy

func (in *PipelineResourceRef) DeepCopy() *PipelineResourceRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceRef.

func (*PipelineResourceRef) DeepCopyInto

func (in *PipelineResourceRef) DeepCopyInto(out *PipelineResourceRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineResourceResult

type PipelineResourceResult struct {
	Key         string              `json:"key"`
	Value       string              `json:"value"`
	ResourceRef PipelineResourceRef `json:"resourceRef,omitempty"`
	ResultType  ResultType          `json:"type,omitempty"`
}

PipelineResourceResult used to export the image name and digest as json

func (*PipelineResourceResult) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceResult.

func (*PipelineResourceResult) DeepCopyInto

func (in *PipelineResourceResult) DeepCopyInto(out *PipelineResourceResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineResourceType

type PipelineResourceType = resource.PipelineResourceType

PipelineResourceType represents the type of endpoint the pipelineResource is, so that the controller will know this pipelineResource should be fetched and optionally what additional metatdata should be provided for it.

const (
	// PipelineResourceTypeGit indicates that this source is a GitHub repo.
	PipelineResourceTypeGit PipelineResourceType = resource.PipelineResourceTypeGit

	// PipelineResourceTypeStorage indicates that this source is a storage blob resource.
	PipelineResourceTypeStorage PipelineResourceType = resource.PipelineResourceTypeStorage

	// PipelineResourceTypeImage indicates that this source is a docker Image.
	PipelineResourceTypeImage PipelineResourceType = resource.PipelineResourceTypeImage

	// PipelineResourceTypeCluster indicates that this source is a k8s cluster Image.
	PipelineResourceTypeCluster PipelineResourceType = resource.PipelineResourceTypeCluster

	// PipelineResourceTypePullRequest indicates that this source is a SCM Pull Request.
	PipelineResourceTypePullRequest PipelineResourceType = resource.PipelineResourceTypePullRequest

	// PipelineResourceTypeCloudEvent indicates that this source is a cloud event URI
	PipelineResourceTypeCloudEvent PipelineResourceType = resource.PipelineResourceTypeCloudEvent
)

type PipelineResult added in v0.12.0

type PipelineResult struct {
	// Name the given name
	Name string `json:"name"`

	// Description is a human-readable description of the result
	// +optional
	Description string `json:"description"`

	// Value the expression used to retrieve the value
	Value string `json:"value"`
}

PipelineResult used to describe the results of a pipeline

func (*PipelineResult) DeepCopy added in v0.12.0

func (in *PipelineResult) DeepCopy() *PipelineResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResult.

func (*PipelineResult) DeepCopyInto added in v0.12.0

func (in *PipelineResult) DeepCopyInto(out *PipelineResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineRun

type PipelineRun struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec PipelineRunSpec `json:"spec,omitempty"`
	// +optional
	Status PipelineRunStatus `json:"status,omitempty"`
}

PipelineRun represents a single execution of a Pipeline. PipelineRuns are how the graph of Tasks declared in a Pipeline are executed; they specify inputs to Pipelines such as parameter values and capture operational aspects of the Tasks execution such as service account and tolerations. Creating a PipelineRun creates TaskRuns for Tasks in the referenced Pipeline.

+k8s:openapi-gen=true

func (*PipelineRun) ConvertFrom added in v0.12.0

func (sink *PipelineRun) ConvertFrom(ctx context.Context, source apis.Convertible) error

ConvertFrom implements api.Convertible

func (*PipelineRun) ConvertTo added in v0.12.0

func (source *PipelineRun) ConvertTo(ctx context.Context, sink apis.Convertible) error

ConvertTo implements api.Convertible

func (*PipelineRun) DeepCopy

func (in *PipelineRun) DeepCopy() *PipelineRun

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRun.

func (*PipelineRun) DeepCopyInto

func (in *PipelineRun) DeepCopyInto(out *PipelineRun)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PipelineRun) DeepCopyObject

func (in *PipelineRun) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PipelineRun) GetName

func (pr *PipelineRun) GetName() string

func (*PipelineRun) GetOwnerReference

func (pr *PipelineRun) GetOwnerReference() metav1.OwnerReference

GetOwnerReference gets the pipeline run as owner reference for any related objects

func (*PipelineRun) GetRunKey

func (pr *PipelineRun) GetRunKey() string

GetRunKey return the pipelinerun key for timeout handler map

func (*PipelineRun) GetServiceAccountName

func (pr *PipelineRun) GetServiceAccountName(pipelineTaskName string) string

GetServiceAccountName returns the service account name for a given PipelineTask if configured, otherwise it returns the PipelineRun's serviceAccountName.

func (*PipelineRun) GetTaskRunRef

func (pr *PipelineRun) GetTaskRunRef() corev1.ObjectReference

GetTaskRunRef for pipelinerun

func (*PipelineRun) GetTaskRunSpecs added in v0.13.0

func (pr *PipelineRun) GetTaskRunSpecs(pipelineTaskName string) (string, *PodTemplate)

GetTaskRunSpecs returns the task specific spec for a given PipelineTask if configured, otherwise it returns the PipelineRun's default.

func (*PipelineRun) HasStarted

func (pr *PipelineRun) HasStarted() bool

HasStarted function check whether pipelinerun has valid start time set in its status

func (*PipelineRun) HasVolumeClaimTemplate added in v0.12.0

func (pr *PipelineRun) HasVolumeClaimTemplate() bool

HasVolumeClaimTemplate returns true if PipelineRun contains volumeClaimTemplates that is used for creating PersistentVolumeClaims with an OwnerReference for each run

func (*PipelineRun) IsCancelled

func (pr *PipelineRun) IsCancelled() bool

IsCancelled returns true if the PipelineRun's spec status is set to Cancelled state

func (*PipelineRun) IsDone

func (pr *PipelineRun) IsDone() bool

IsDone returns true if the PipelineRun's status indicates that it is done.

func (*PipelineRun) IsTimedOut

func (pr *PipelineRun) IsTimedOut() bool

IsTimedOut returns true if a pipelinerun has exceeded its spec.Timeout based on its status.Timeout

func (*PipelineRun) SetDefaults

func (pr *PipelineRun) SetDefaults(ctx context.Context)

func (*PipelineRun) Validate

func (pr *PipelineRun) Validate(ctx context.Context) *apis.FieldError

Validate pipelinerun

type PipelineRunConditionCheckStatus

type PipelineRunConditionCheckStatus struct {
	// ConditionName is the name of the Condition
	ConditionName string `json:"conditionName,omitempty"`
	// Status is the ConditionCheckStatus for the corresponding ConditionCheck
	// +optional
	Status *ConditionCheckStatus `json:"status,omitempty"`
}

PipelineRunConditionCheckStatus returns the condition check status

func (*PipelineRunConditionCheckStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunConditionCheckStatus.

func (*PipelineRunConditionCheckStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineRunList

type PipelineRunList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PipelineRun `json:"items,omitempty"`
}

PipelineRunList contains a list of PipelineRun

func (*PipelineRunList) DeepCopy

func (in *PipelineRunList) DeepCopy() *PipelineRunList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunList.

func (*PipelineRunList) DeepCopyInto

func (in *PipelineRunList) DeepCopyInto(out *PipelineRunList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PipelineRunList) DeepCopyObject

func (in *PipelineRunList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PipelineRunResult added in v0.12.0

type PipelineRunResult struct {
	// Name is the result's name as declared by the Pipeline
	Name string `json:"name"`

	// Value is the result returned from the execution of this PipelineRun
	Value string `json:"value"`
}

PipelineRunResult used to describe the results of a pipeline

func (*PipelineRunResult) DeepCopy added in v0.12.0

func (in *PipelineRunResult) DeepCopy() *PipelineRunResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunResult.

func (*PipelineRunResult) DeepCopyInto added in v0.12.0

func (in *PipelineRunResult) DeepCopyInto(out *PipelineRunResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineRunSpec

type PipelineRunSpec struct {
	// +optional
	PipelineRef *PipelineRef `json:"pipelineRef,omitempty"`
	// +optional
	PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"`
	// Resources is a list of bindings specifying which actual instances of
	// PipelineResources to use for the resources the Pipeline has declared
	// it needs.
	Resources []PipelineResourceBinding `json:"resources,omitempty"`
	// Params is a list of parameter names and values.
	Params []Param `json:"params,omitempty"`
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// +optional
	ServiceAccountNames []PipelineRunSpecServiceAccountName `json:"serviceAccountNames,omitempty"`
	// Used for cancelling a pipelinerun (and maybe more later on)
	// +optional
	Status PipelineRunSpecStatus `json:"status,omitempty"`
	// Time after which the Pipeline times out. Defaults to never.
	// Refer to Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`
	// PodTemplate holds pod specific configuration
	PodTemplate *PodTemplate `json:"podTemplate,omitempty"`
	// Workspaces holds a set of workspace bindings that must match names
	// with those declared in the pipeline.
	// +optional
	Workspaces []WorkspaceBinding `json:"workspaces,omitempty"`
	// TaskRunSpecs holds a set of runtime specs
	// +optional
	TaskRunSpecs []PipelineTaskRunSpec `json:"taskRunSpecs,omitempty"`
}

PipelineRunSpec defines the desired state of PipelineRun

func (*PipelineRunSpec) DeepCopy

func (in *PipelineRunSpec) DeepCopy() *PipelineRunSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunSpec.

func (*PipelineRunSpec) DeepCopyInto

func (in *PipelineRunSpec) DeepCopyInto(out *PipelineRunSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PipelineRunSpec) SetDefaults

func (prs *PipelineRunSpec) SetDefaults(ctx context.Context)

func (*PipelineRunSpec) Validate

func (ps *PipelineRunSpec) Validate(ctx context.Context) *apis.FieldError

Validate pipelinerun spec

type PipelineRunSpecServiceAccountName

type PipelineRunSpecServiceAccountName struct {
	TaskName           string `json:"taskName,omitempty"`
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

PipelineRunSpecServiceAccountName can be used to configure specific ServiceAccountName for a concrete Task

func (*PipelineRunSpecServiceAccountName) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunSpecServiceAccountName.

func (*PipelineRunSpecServiceAccountName) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineRunSpecStatus

type PipelineRunSpecStatus string

PipelineRunSpecStatus defines the pipelinerun spec status the user can provide

type PipelineRunStatus

type PipelineRunStatus struct {
	duckv1beta1.Status `json:",inline"`

	// PipelineRunStatusFields inlines the status fields.
	PipelineRunStatusFields `json:",inline"`
}

PipelineRunStatus defines the observed state of PipelineRun

func (*PipelineRunStatus) DeepCopy

func (in *PipelineRunStatus) DeepCopy() *PipelineRunStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunStatus.

func (*PipelineRunStatus) DeepCopyInto

func (in *PipelineRunStatus) DeepCopyInto(out *PipelineRunStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PipelineRunStatus) GetCondition

func (pr *PipelineRunStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the Condition matching the given type.

func (*PipelineRunStatus) InitializeConditions

func (pr *PipelineRunStatus) InitializeConditions()

InitializeConditions will set all conditions in pipelineRunCondSet to unknown for the PipelineRun and set the started time to the current time

func (*PipelineRunStatus) MarkFailed added in v0.13.0

func (pr *PipelineRunStatus) MarkFailed(reason, messageFormat string, messageA ...interface{})

MarkFailed changes the Succeeded condition to False with the provided reason and message.

func (*PipelineRunStatus) MarkResourceNotConvertible

func (pr *PipelineRunStatus) MarkResourceNotConvertible(err *CannotConvertError)

MarkResourceNotConvertible adds a Warning-severity condition to the resource noting that it cannot be converted to a higher version.

func (*PipelineRunStatus) MarkRunning added in v0.13.0

func (pr *PipelineRunStatus) MarkRunning(reason, messageFormat string, messageA ...interface{})

MarkRunning changes the Succeeded condition to Unknown with the provided reason and message.

func (*PipelineRunStatus) MarkSucceeded added in v0.13.0

func (pr *PipelineRunStatus) MarkSucceeded(reason, messageFormat string, messageA ...interface{})

MarkSucceeded changes the Succeeded condition to True with the provided reason and message.

func (*PipelineRunStatus) SetCondition

func (pr *PipelineRunStatus) SetCondition(newCond *apis.Condition)

SetCondition sets the condition, unsetting previous conditions with the same type as necessary.

type PipelineRunStatusFields

type PipelineRunStatusFields struct {
	// StartTime is the time the PipelineRun is actually started.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is the time the PipelineRun completed.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// map of PipelineRunTaskRunStatus with the taskRun name as the key
	// +optional
	TaskRuns map[string]*PipelineRunTaskRunStatus `json:"taskRuns,omitempty"`

	// PipelineResults are the list of results written out by the pipeline task's containers
	// +optional
	PipelineResults []PipelineRunResult `json:"pipelineResults,omitempty"`

	// PipelineRunSpec contains the exact spec used to instantiate the run
	PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"`
}

PipelineRunStatusFields holds the fields of PipelineRunStatus' status. This is defined separately and inlined so that other types can readily consume these fields via duck typing.

func (*PipelineRunStatusFields) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunStatusFields.

func (*PipelineRunStatusFields) DeepCopyInto

func (in *PipelineRunStatusFields) DeepCopyInto(out *PipelineRunStatusFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineRunTaskRunStatus

type PipelineRunTaskRunStatus struct {
	// PipelineTaskName is the name of the PipelineTask.
	PipelineTaskName string `json:"pipelineTaskName,omitempty"`
	// Status is the TaskRunStatus for the corresponding TaskRun
	// +optional
	Status *TaskRunStatus `json:"status,omitempty"`
	// ConditionChecks maps the name of a condition check to its Status
	// +optional
	ConditionChecks map[string]*PipelineRunConditionCheckStatus `json:"conditionChecks,omitempty"`
}

PipelineRunTaskRunStatus contains the name of the PipelineTask for this TaskRun and the TaskRun's Status

func (*PipelineRunTaskRunStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineRunTaskRunStatus.

func (*PipelineRunTaskRunStatus) DeepCopyInto

func (in *PipelineRunTaskRunStatus) DeepCopyInto(out *PipelineRunTaskRunStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineSpec

type PipelineSpec struct {
	// Description is a user-facing description of the pipeline that may be
	// used to populate a UI.
	// +optional
	Description string `json:"description,omitempty"`
	// Resources declares the names and types of the resources given to the
	// Pipeline's tasks as inputs and outputs.
	Resources []PipelineDeclaredResource `json:"resources,omitempty"`
	// Tasks declares the graph of Tasks that execute when this Pipeline is run.
	Tasks []PipelineTask `json:"tasks,omitempty"`
	// Params declares a list of input parameters that must be supplied when
	// this Pipeline is run.
	Params []ParamSpec `json:"params,omitempty"`
	// Workspaces declares a set of named workspaces that are expected to be
	// provided by a PipelineRun.
	// +optional
	Workspaces []PipelineWorkspaceDeclaration `json:"workspaces,omitempty"`
	// Results are values that this pipeline can output once run
	// +optional
	Results []PipelineResult `json:"results,omitempty"`
}

PipelineSpec defines the desired state of Pipeline.

func (*PipelineSpec) DeepCopy

func (in *PipelineSpec) DeepCopy() *PipelineSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineSpec.

func (*PipelineSpec) DeepCopyInto

func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PipelineSpec) SetDefaults

func (ps *PipelineSpec) SetDefaults(ctx context.Context)

func (*PipelineSpec) Validate

func (ps *PipelineSpec) Validate(ctx context.Context) *apis.FieldError

Validate checks that taskNames in the Pipeline are valid and that the graph of Tasks expressed in the Pipeline makes sense.

type PipelineTask

type PipelineTask struct {
	// Name is the name of this task within the context of a Pipeline. Name is
	// used as a coordinate with the `from` and `runAfter` fields to establish
	// the execution order of tasks relative to one another.
	Name string `json:"name,omitempty"`

	// TaskRef is a reference to a task definition.
	// +optional
	TaskRef *TaskRef `json:"taskRef,omitempty"`

	// TaskSpec is a specification of a task
	// +optional
	TaskSpec *TaskSpec `json:"taskSpec,omitempty"`

	// Conditions is a list of conditions that need to be true for the task to run
	// +optional
	Conditions []PipelineTaskCondition `json:"conditions,omitempty"`

	// Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False
	// +optional
	Retries int `json:"retries,omitempty"`

	// RunAfter is the list of PipelineTask names that should be executed before
	// this Task executes. (Used to force a specific ordering in graph execution.)
	// +optional
	RunAfter []string `json:"runAfter,omitempty"`

	// Resources declares the resources given to this task as inputs and
	// outputs.
	// +optional
	Resources *PipelineTaskResources `json:"resources,omitempty"`
	// Parameters declares parameters passed to this task.
	// +optional
	Params []Param `json:"params,omitempty"`

	// Workspaces maps workspaces from the pipeline spec to the workspaces
	// declared in the Task.
	// +optional
	Workspaces []WorkspacePipelineTaskBinding `json:"workspaces,omitempty"`

	// Time after which the TaskRun times out. Defaults to 1 hour.
	// Specified TaskRun timeout should be less than 24h.
	// Refer Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`
}

PipelineTask defines a task in a Pipeline, passing inputs from both Params and from the output of previous tasks.

func (*PipelineTask) DeepCopy

func (in *PipelineTask) DeepCopy() *PipelineTask

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTask.

func (*PipelineTask) DeepCopyInto

func (in *PipelineTask) DeepCopyInto(out *PipelineTask)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PipelineTask) Deps

func (pt PipelineTask) Deps() []string

func (PipelineTask) HashKey

func (pt PipelineTask) HashKey() string

type PipelineTaskCondition

type PipelineTaskCondition struct {
	// ConditionRef is the name of the Condition to use for the conditionCheck
	ConditionRef string `json:"conditionRef"`

	// Params declare parameters passed to this Condition
	// +optional
	Params []Param `json:"params,omitempty"`

	// Resources declare the resources provided to this Condition as input
	Resources []PipelineTaskInputResource `json:"resources,omitempty"`
}

PipelineTaskCondition allows a PipelineTask to declare a Condition to be evaluated before the Task is run.

func (*PipelineTaskCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskCondition.

func (*PipelineTaskCondition) DeepCopyInto

func (in *PipelineTaskCondition) DeepCopyInto(out *PipelineTaskCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineTaskInputResource

type PipelineTaskInputResource struct {
	// Name is the name of the PipelineResource as declared by the Task.
	Name string `json:"name"`
	// Resource is the name of the DeclaredPipelineResource to use.
	Resource string `json:"resource"`
	// From is the list of PipelineTask names that the resource has to come from.
	// (Implies an ordering in the execution graph.)
	// +optional
	From []string `json:"from,omitempty"`
}

PipelineTaskInputResource maps the name of a declared PipelineResource input dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used. This input may come from a previous task.

func (*PipelineTaskInputResource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskInputResource.

func (*PipelineTaskInputResource) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineTaskList

type PipelineTaskList []PipelineTask

func (PipelineTaskList) DeepCopy

func (in PipelineTaskList) DeepCopy() PipelineTaskList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskList.

func (PipelineTaskList) DeepCopyInto

func (in PipelineTaskList) DeepCopyInto(out *PipelineTaskList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PipelineTaskList) Items

func (l PipelineTaskList) Items() []dag.Task

type PipelineTaskOutputResource

type PipelineTaskOutputResource struct {
	// Name is the name of the PipelineResource as declared by the Task.
	Name string `json:"name"`
	// Resource is the name of the DeclaredPipelineResource to use.
	Resource string `json:"resource"`
}

PipelineTaskOutputResource maps the name of a declared PipelineResource output dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used.

func (*PipelineTaskOutputResource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskOutputResource.

func (*PipelineTaskOutputResource) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineTaskParam

type PipelineTaskParam struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

PipelineTaskParam is used to provide arbitrary string parameters to a Task.

func (*PipelineTaskParam) DeepCopy

func (in *PipelineTaskParam) DeepCopy() *PipelineTaskParam

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskParam.

func (*PipelineTaskParam) DeepCopyInto

func (in *PipelineTaskParam) DeepCopyInto(out *PipelineTaskParam)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineTaskResources

type PipelineTaskResources struct {
	// Inputs holds the mapping from the PipelineResources declared in
	// DeclaredPipelineResources to the input PipelineResources required by the Task.
	Inputs []PipelineTaskInputResource `json:"inputs,omitempty"`
	// Outputs holds the mapping from the PipelineResources declared in
	// DeclaredPipelineResources to the input PipelineResources required by the Task.
	Outputs []PipelineTaskOutputResource `json:"outputs,omitempty"`
}

PipelineTaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs.

func (*PipelineTaskResources) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskResources.

func (*PipelineTaskResources) DeepCopyInto

func (in *PipelineTaskResources) DeepCopyInto(out *PipelineTaskResources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineTaskRun

type PipelineTaskRun struct {
	Name string `json:"name,omitempty"`
}

PipelineTaskRun reports the results of running a step in the Task. Each task has the potential to succeed or fail (based on the exit code) and produces logs.

func (*PipelineTaskRun) DeepCopy

func (in *PipelineTaskRun) DeepCopy() *PipelineTaskRun

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskRun.

func (*PipelineTaskRun) DeepCopyInto

func (in *PipelineTaskRun) DeepCopyInto(out *PipelineTaskRun)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineTaskRunSpec added in v0.13.0

type PipelineTaskRunSpec struct {
	PipelineTaskName       string       `json:"pipelineTaskName,omitempty"`
	TaskServiceAccountName string       `json:"taskServiceAccountName,omitempty"`
	TaskPodTemplate        *PodTemplate `json:"taskPodTemplate,omitempty"`
}

PipelineTaskRunSpec can be used to configure specific specs for a concrete Task

func (*PipelineTaskRunSpec) DeepCopy added in v0.13.0

func (in *PipelineTaskRunSpec) DeepCopy() *PipelineTaskRunSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskRunSpec.

func (*PipelineTaskRunSpec) DeepCopyInto added in v0.13.0

func (in *PipelineTaskRunSpec) DeepCopyInto(out *PipelineTaskRunSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PipelineWorkspaceDeclaration added in v0.13.0

type PipelineWorkspaceDeclaration struct {
	// Name is the name of a workspace to be provided by a PipelineRun.
	Name string `json:"name"`
	// Description is a human readable string describing how the workspace will be
	// used in the Pipeline. It can be useful to include a bit of detail about which
	// tasks are intended to have access to the data on the workspace.
	// +optional
	Description string `json:"description,omitempty"`
}

PipelineWorkspaceDeclaration creates a named slot in a Pipeline that a PipelineRun is expected to populate with a workspace binding.

func (*PipelineWorkspaceDeclaration) DeepCopy added in v0.13.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineWorkspaceDeclaration.

func (*PipelineWorkspaceDeclaration) DeepCopyInto added in v0.13.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodTemplate

type PodTemplate = pod.Template

PodTemplate holds pod specific configuration

type ResourceDeclaration

type ResourceDeclaration = resource.ResourceDeclaration

ResourceDeclaration defines an input or output PipelineResource declared as a requirement by another type such as a Task or Condition. The Name field will be used to refer to these PipelineResources within the type's definition, and when provided as an Input, the Name will be the path to the volume mounted containing this PipelineResource as an input (e.g. an input Resource named `workspace` will be mounted at `/workspace`).

type ResourceParam

type ResourceParam = resource.ResourceParam

ResourceParam declares a string value to use for the parameter called Name, and is used in the specific context of PipelineResources.

type ResultRef

type ResultRef struct {
	PipelineTask string
	Result       string
}

ResultRef is a type that represents a reference to a task run result

func NewResultRefs

func NewResultRefs(expressions []string) []*ResultRef

NewResultRefs extracts all ResultReferences from a param or a pipeline result. If the ResultReference can be extracted, they are returned. Expressions which are not results are ignored.

func (*ResultRef) DeepCopy

func (in *ResultRef) DeepCopy() *ResultRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResultRef.

func (*ResultRef) DeepCopyInto

func (in *ResultRef) DeepCopyInto(out *ResultRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResultType

type ResultType string

ResultType used to find out whether a PipelineResourceResult is from a task result or not

const (
	// TaskRunResultType default task run result value
	TaskRunResultType ResultType = "TaskRunResult"
	// PipelineResourceResultType default pipeline result value
	PipelineResourceResultType ResultType = "PipelineResourceResult"
	// UnknownResultType default unknown result type value
	UnknownResultType ResultType = ""
)

type Sidecar

type Sidecar = Step

A sidecar has the same data structure as a Step, consisting of a Container, and optional Script.

type SidecarState

type SidecarState struct {
	corev1.ContainerState `json:",inline"`
	Name                  string `json:"name,omitempty"`
	ContainerName         string `json:"container,omitempty"`
	ImageID               string `json:"imageID,omitempty"`
}

SidecarState reports the results of running a sidecar in a Task.

func (*SidecarState) DeepCopy

func (in *SidecarState) DeepCopy() *SidecarState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SidecarState.

func (*SidecarState) DeepCopyInto

func (in *SidecarState) DeepCopyInto(out *SidecarState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Step

type Step struct {
	corev1.Container `json:",inline"`

	// Script is the contents of an executable file to execute.
	//
	// If Script is not empty, the Step cannot have an Command or Args.
	Script string `json:"script,omitempty"`
}

Step embeds the Container type, which allows it to include fields not provided by Container.

func MergeStepsWithStepTemplate

func MergeStepsWithStepTemplate(template *v1.Container, steps []Step) ([]Step, error)

MergeStepsWithStepTemplate takes a possibly nil container template and a list of steps, merging each of the steps with the container template, if it's not nil, and returning the resulting list.

func (*Step) DeepCopy

func (in *Step) DeepCopy() *Step

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Step.

func (*Step) DeepCopyInto

func (in *Step) DeepCopyInto(out *Step)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StepState

type StepState struct {
	corev1.ContainerState `json:",inline"`
	Name                  string `json:"name,omitempty"`
	ContainerName         string `json:"container,omitempty"`
	ImageID               string `json:"imageID,omitempty"`
}

StepState reports the results of running a step in a Task.

func (*StepState) DeepCopy

func (in *StepState) DeepCopy() *StepState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepState.

func (*StepState) DeepCopyInto

func (in *StepState) DeepCopyInto(out *StepState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Task

type Task struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata"`

	// Spec holds the desired state of the Task from the client
	// +optional
	Spec TaskSpec `json:"spec"`
}

Task represents a collection of sequential steps that are run as part of a Pipeline using a set of inputs and producing a set of outputs. Tasks execute when TaskRuns are created that provide the input parameters and resources and output resources the Task requires.

+k8s:openapi-gen=true

func (*Task) ConvertFrom added in v0.12.0

func (sink *Task) ConvertFrom(ctx context.Context, source apis.Convertible) error

ConvertFrom implements api.Convertible

func (*Task) ConvertTo added in v0.12.0

func (source *Task) ConvertTo(ctx context.Context, sink apis.Convertible) error

ConvertTo implements api.Convertible

func (*Task) Copy

func (t *Task) Copy() TaskInterface

func (*Task) DeepCopy

func (in *Task) DeepCopy() *Task

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Task) DeepCopyObject

func (in *Task) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Task) SetDefaults

func (t *Task) SetDefaults(ctx context.Context)

func (*Task) TaskMetadata

func (t *Task) TaskMetadata() metav1.ObjectMeta

func (*Task) TaskSpec

func (t *Task) TaskSpec() TaskSpec

func (*Task) Validate

func (t *Task) Validate(ctx context.Context) *apis.FieldError

type TaskInterface

type TaskInterface interface {
	TaskMetadata() metav1.ObjectMeta
	TaskSpec() TaskSpec
	Copy() TaskInterface
}

TaskInterface is implemented by Task and ClusterTask

type TaskKind

type TaskKind string

Check that Pipeline may be validated and defaulted. TaskKind defines the type of Task used by the pipeline.

const (
	// NamespacedTaskKind indicates that the task type has a namespaced scope.
	NamespacedTaskKind TaskKind = "Task"
	// ClusterTaskKind indicates that task type has a cluster scope.
	ClusterTaskKind TaskKind = "ClusterTask"
)

type TaskList

type TaskList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Task `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object TaskList contains a list of Task

func (*TaskList) DeepCopy

func (in *TaskList) DeepCopy() *TaskList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList.

func (*TaskList) DeepCopyInto

func (in *TaskList) DeepCopyInto(out *TaskList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskList) DeepCopyObject

func (in *TaskList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TaskModifier

type TaskModifier interface {
	GetStepsToPrepend() []Step
	GetStepsToAppend() []Step
	GetVolumes() []v1.Volume
}

TaskModifier is an interface to be implemented by different PipelineResources

type TaskRef

type TaskRef struct {
	// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
	Name string `json:"name,omitempty"`
	// TaskKind indicates the kind of the task, namespaced or cluster scoped.
	Kind TaskKind `json:"kind,omitempty"`
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

TaskRef can be used to refer to a specific instance of a task. Copied from CrossVersionObjectReference: https://github.com/kubernetes/kubernetes/blob/169df7434155cbbc22f1532cba8e0a9588e29ad8/pkg/apis/autoscaling/types.go#L64

func (*TaskRef) DeepCopy

func (in *TaskRef) DeepCopy() *TaskRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRef.

func (*TaskRef) DeepCopyInto

func (in *TaskRef) DeepCopyInto(out *TaskRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskResource

type TaskResource struct {
	ResourceDeclaration `json:",inline"`
}

TaskResource defines an input or output Resource declared as a requirement by a Task. The Name field will be used to refer to these Resources within the Task definition, and when provided as an Input, the Name will be the path to the volume mounted containing this Resource as an input (e.g. an input Resource named `workspace` will be mounted at `/workspace`).

func (*TaskResource) DeepCopy

func (in *TaskResource) DeepCopy() *TaskResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResource.

func (*TaskResource) DeepCopyInto

func (in *TaskResource) DeepCopyInto(out *TaskResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskResourceBinding

type TaskResourceBinding struct {
	PipelineResourceBinding `json:",inline"`
	// Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead.
	// The optional Path field corresponds to a path on disk at which the Resource can be found
	// (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource).
	// +optional
	Paths []string `json:"paths,omitempty"`
}

TaskResourceBinding points to the PipelineResource that will be used for the Task input or output called Name.

func (*TaskResourceBinding) DeepCopy

func (in *TaskResourceBinding) DeepCopy() *TaskResourceBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResourceBinding.

func (*TaskResourceBinding) DeepCopyInto

func (in *TaskResourceBinding) DeepCopyInto(out *TaskResourceBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskResources

type TaskResources struct {
	// Inputs holds the mapping from the PipelineResources declared in
	// DeclaredPipelineResources to the input PipelineResources required by the Task.
	Inputs []TaskResource `json:"inputs,omitempty"`
	// Outputs holds the mapping from the PipelineResources declared in
	// DeclaredPipelineResources to the input PipelineResources required by the Task.
	Outputs []TaskResource `json:"outputs,omitempty"`
}

TaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs.

func (*TaskResources) DeepCopy

func (in *TaskResources) DeepCopy() *TaskResources

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResources.

func (*TaskResources) DeepCopyInto

func (in *TaskResources) DeepCopyInto(out *TaskResources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskResources) Validate

func (tr *TaskResources) Validate(ctx context.Context) *apis.FieldError

type TaskResult

type TaskResult struct {
	// Name the given name
	Name string `json:"name"`

	// Description is a human-readable description of the result
	// +optional
	Description string `json:"description"`
}

TaskResult used to describe the results of a task

func (*TaskResult) DeepCopy

func (in *TaskResult) DeepCopy() *TaskResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResult.

func (*TaskResult) DeepCopyInto

func (in *TaskResult) DeepCopyInto(out *TaskResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskRun

type TaskRun struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec TaskRunSpec `json:"spec,omitempty"`
	// +optional
	Status TaskRunStatus `json:"status,omitempty"`
}

TaskRun represents a single execution of a Task. TaskRuns are how the steps specified in a Task are executed; they specify the parameters and resources used to run the steps in a Task.

+k8s:openapi-gen=true

func (*TaskRun) ConvertFrom added in v0.12.0

func (sink *TaskRun) ConvertFrom(ctx context.Context, source apis.Convertible) error

ConvertFrom implements api.Convertible

func (*TaskRun) ConvertTo added in v0.12.0

func (source *TaskRun) ConvertTo(ctx context.Context, sink apis.Convertible) error

ConvertTo implements api.Convertible

func (*TaskRun) DeepCopy

func (in *TaskRun) DeepCopy() *TaskRun

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRun.

func (*TaskRun) DeepCopyInto

func (in *TaskRun) DeepCopyInto(out *TaskRun)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskRun) DeepCopyObject

func (in *TaskRun) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TaskRun) GetBuildPodRef

func (tr *TaskRun) GetBuildPodRef() corev1.ObjectReference

GetBuildPodRef for task

func (*TaskRun) GetOwnerReference added in v0.12.0

func (tr *TaskRun) GetOwnerReference() metav1.OwnerReference

GetOwnerReference gets the task run as owner reference for any related objects

func (*TaskRun) GetPipelineRunPVCName

func (tr *TaskRun) GetPipelineRunPVCName() string

GetPipelineRunPVCName for taskrun gets pipelinerun

func (*TaskRun) GetRunKey

func (tr *TaskRun) GetRunKey() string

GetRunKey return the taskrun key for timeout handler map

func (*TaskRun) GetTimeout added in v0.12.0

func (tr *TaskRun) GetTimeout() time.Duration

func (*TaskRun) HasPipelineRunOwnerReference

func (tr *TaskRun) HasPipelineRunOwnerReference() bool

HasPipelineRunOwnerReference returns true of TaskRun has owner reference of type PipelineRun

func (*TaskRun) HasStarted

func (tr *TaskRun) HasStarted() bool

HasStarted function check whether taskrun has valid start time set in its status

func (*TaskRun) HasTimedOut added in v0.12.0

func (tr *TaskRun) HasTimedOut() bool

HasTimedOut returns true if the TaskRun runtime is beyond the allowed timeout

func (*TaskRun) HasVolumeClaimTemplate added in v0.12.0

func (tr *TaskRun) HasVolumeClaimTemplate() bool

HasVolumeClaimTemplate returns true if TaskRun contains volumeClaimTemplates that is used for creating PersistentVolumeClaims with an OwnerReference for each run

func (*TaskRun) IsCancelled

func (tr *TaskRun) IsCancelled() bool

IsCancelled returns true if the TaskRun's spec status is set to Cancelled state

func (*TaskRun) IsDone

func (tr *TaskRun) IsDone() bool

IsDone returns true if the TaskRun's status indicates that it is done.

func (*TaskRun) IsPartOfPipeline

func (tr *TaskRun) IsPartOfPipeline() (bool, string, string)

IsPartOfPipeline return true if TaskRun is a part of a Pipeline. It also return the name of Pipeline and PipelineRun

func (*TaskRun) IsSuccessful

func (tr *TaskRun) IsSuccessful() bool

IsSuccessful returns true if the TaskRun's status indicates that it is done.

func (*TaskRun) SetDefaults

func (tr *TaskRun) SetDefaults(ctx context.Context)

func (*TaskRun) Validate

func (tr *TaskRun) Validate(ctx context.Context) *apis.FieldError

Validate taskrun

type TaskRunInputs

type TaskRunInputs struct {
	// +optional
	Resources []TaskResourceBinding `json:"resources,omitempty"`
	// +optional
	Params []Param `json:"params,omitempty"`
}

TaskRunInputs holds the input values that this task was invoked with.

func (*TaskRunInputs) DeepCopy

func (in *TaskRunInputs) DeepCopy() *TaskRunInputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunInputs.

func (*TaskRunInputs) DeepCopyInto

func (in *TaskRunInputs) DeepCopyInto(out *TaskRunInputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskRunList

type TaskRunList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TaskRun `json:"items"`
}

TaskRunList contains a list of TaskRun

func (*TaskRunList) DeepCopy

func (in *TaskRunList) DeepCopy() *TaskRunList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunList.

func (*TaskRunList) DeepCopyInto

func (in *TaskRunList) DeepCopyInto(out *TaskRunList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskRunList) DeepCopyObject

func (in *TaskRunList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TaskRunOutputs

type TaskRunOutputs struct {
	// +optional
	Resources []TaskResourceBinding `json:"resources,omitempty"`
}

TaskRunOutputs holds the output values that this task was invoked with.

func (*TaskRunOutputs) DeepCopy

func (in *TaskRunOutputs) DeepCopy() *TaskRunOutputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunOutputs.

func (*TaskRunOutputs) DeepCopyInto

func (in *TaskRunOutputs) DeepCopyInto(out *TaskRunOutputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskRunResources

type TaskRunResources struct {
	// Inputs holds the inputs resources this task was invoked with
	Inputs []TaskResourceBinding `json:"inputs,omitempty"`
	// Outputs holds the inputs resources this task was invoked with
	Outputs []TaskResourceBinding `json:"outputs,omitempty"`
}

TaskRunResources allows a TaskRun to declare inputs and outputs TaskResourceBinding

func (*TaskRunResources) DeepCopy

func (in *TaskRunResources) DeepCopy() *TaskRunResources

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunResources.

func (*TaskRunResources) DeepCopyInto

func (in *TaskRunResources) DeepCopyInto(out *TaskRunResources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskRunResources) Validate

func (tr *TaskRunResources) Validate(ctx context.Context) *apis.FieldError

type TaskRunResult

type TaskRunResult struct {
	// Name the given name
	Name string `json:"name"`

	// Value the given value of the result
	Value string `json:"value"`
}

TaskRunResult used to describe the results of a task

func (*TaskRunResult) DeepCopy

func (in *TaskRunResult) DeepCopy() *TaskRunResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunResult.

func (*TaskRunResult) DeepCopyInto

func (in *TaskRunResult) DeepCopyInto(out *TaskRunResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskRunSpec

type TaskRunSpec struct {
	// +optional
	Params []Param `json:"params,omitempty"`
	// +optional
	Resources *TaskRunResources `json:"resources,omitempty"`
	// +optional
	ServiceAccountName string `json:"serviceAccountName"`
	// no more than one of the TaskRef and TaskSpec may be specified.
	// +optional
	TaskRef *TaskRef `json:"taskRef,omitempty"`
	// +optional
	TaskSpec *TaskSpec `json:"taskSpec,omitempty"`
	// Used for cancelling a taskrun (and maybe more later on)
	// +optional
	Status TaskRunSpecStatus `json:"status,omitempty"`
	// Time after which the build times out. Defaults to 1 hour.
	// Specified build timeout should be less than 24h.
	// Refer Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`
	// PodTemplate holds pod specific configuration
	PodTemplate *PodTemplate `json:"podTemplate,omitempty"`
	// Workspaces is a list of WorkspaceBindings from volumes to workspaces.
	// +optional
	Workspaces []WorkspaceBinding `json:"workspaces,omitempty"`
}

TaskRunSpec defines the desired state of TaskRun

func (*TaskRunSpec) DeepCopy

func (in *TaskRunSpec) DeepCopy() *TaskRunSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunSpec.

func (*TaskRunSpec) DeepCopyInto

func (in *TaskRunSpec) DeepCopyInto(out *TaskRunSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskRunSpec) SetDefaults

func (trs *TaskRunSpec) SetDefaults(ctx context.Context)

func (*TaskRunSpec) Validate

func (ts *TaskRunSpec) Validate(ctx context.Context) *apis.FieldError

Validate taskrun spec

type TaskRunSpecStatus

type TaskRunSpecStatus string

TaskRunSpecStatus defines the taskrun spec status the user can provide

type TaskRunStatus

type TaskRunStatus struct {
	duckv1beta1.Status `json:",inline"`

	// TaskRunStatusFields inlines the status fields.
	TaskRunStatusFields `json:",inline"`
}

TaskRunStatus defines the observed state of TaskRun

func (*TaskRunStatus) DeepCopy

func (in *TaskRunStatus) DeepCopy() *TaskRunStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunStatus.

func (*TaskRunStatus) DeepCopyInto

func (in *TaskRunStatus) DeepCopyInto(out *TaskRunStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskRunStatus) GetCondition

func (trs *TaskRunStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the Condition matching the given type.

func (*TaskRunStatus) InitializeConditions

func (trs *TaskRunStatus) InitializeConditions()

InitializeConditions will set all conditions in taskRunCondSet to unknown for the TaskRun and set the started time to the current time

func (*TaskRunStatus) MarkResourceFailed added in v0.12.0

func (trs *TaskRunStatus) MarkResourceFailed(reason string, err error)

MarkResourceFailed sets the ConditionSucceeded condition to ConditionFalse based on an error that occurred and a reason

func (*TaskRunStatus) MarkResourceNotConvertible

func (trs *TaskRunStatus) MarkResourceNotConvertible(err *CannotConvertError)

MarkResourceNotConvertible adds a Warning-severity condition to the resource noting that it cannot be converted to a higher version.

func (*TaskRunStatus) SetCondition

func (trs *TaskRunStatus) SetCondition(newCond *apis.Condition)

SetCondition sets the condition, unsetting previous conditions with the same type as necessary.

type TaskRunStatusFields

type TaskRunStatusFields struct {
	// PodName is the name of the pod responsible for executing this task's steps.
	PodName string `json:"podName"`

	// StartTime is the time the build is actually started.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is the time the build completed.
	// +optional
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Steps describes the state of each build step container.
	// +optional
	Steps []StepState `json:"steps,omitempty"`

	// CloudEvents describe the state of each cloud event requested via a
	// CloudEventResource.
	// +optional
	CloudEvents []CloudEventDelivery `json:"cloudEvents,omitempty"`

	// RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures.
	// All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant.
	// +optional
	RetriesStatus []TaskRunStatus `json:"retriesStatus,omitempty"`

	// Results from Resources built during the taskRun. currently includes
	// the digest of build container images
	// +optional
	ResourcesResult []PipelineResourceResult `json:"resourcesResult,omitempty"`

	// TaskRunResults are the list of results written out by the task's containers
	// +optional
	TaskRunResults []TaskRunResult `json:"taskResults,omitempty"`

	// The list has one entry per sidecar in the manifest. Each entry is
	// represents the imageid of the corresponding sidecar.
	Sidecars []SidecarState `json:"sidecars,omitempty"`

	// TaskSpec contains the Spec from the dereferenced Task definition used to instantiate this TaskRun.
	TaskSpec *TaskSpec `json:"taskSpec,omitempty"`
}

TaskRunStatusFields holds the fields of TaskRun's status. This is defined separately and inlined so that other types can readily consume these fields via duck typing.

func (*TaskRunStatusFields) DeepCopy

func (in *TaskRunStatusFields) DeepCopy() *TaskRunStatusFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunStatusFields.

func (*TaskRunStatusFields) DeepCopyInto

func (in *TaskRunStatusFields) DeepCopyInto(out *TaskRunStatusFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskSpec

type TaskSpec struct {
	// Resources is a list input and output resource to run the task
	// Resources are represented in TaskRuns as bindings to instances of
	// PipelineResources.
	// +optional
	Resources *TaskResources `json:"resources,omitempty"`

	// Params is a list of input parameters required to run the task. Params
	// must be supplied as inputs in TaskRuns unless they declare a default
	// value.
	// +optional
	Params []ParamSpec `json:"params,omitempty"`

	// Description is a user-facing description of the task that may be
	// used to populate a UI.
	// +optional
	Description string `json:"description,omitempty"`

	// Steps are the steps of the build; each step is run sequentially with the
	// source mounted into /workspace.
	Steps []Step `json:"steps,omitempty"`

	// Volumes is a collection of volumes that are available to mount into the
	// steps of the build.
	Volumes []corev1.Volume `json:"volumes,omitempty"`

	// StepTemplate can be used as the basis for all step containers within the
	// Task, so that the steps inherit settings on the base container.
	StepTemplate *corev1.Container `json:"stepTemplate,omitempty"`

	// Sidecars are run alongside the Task's step containers. They begin before
	// the steps start and end after the steps complete.
	Sidecars []Sidecar `json:"sidecars,omitempty"`

	// Workspaces are the volumes that this Task requires.
	Workspaces []WorkspaceDeclaration `json:"workspaces,omitempty"`

	// Results are values that this Task can output
	Results []TaskResult `json:"results,omitempty"`
}

TaskSpec defines the desired state of Task.

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TaskSpec) SetDefaults

func (ts *TaskSpec) SetDefaults(ctx context.Context)

SetDefaults set any defaults for the task spec

func (*TaskSpec) Validate

func (ts *TaskSpec) Validate(ctx context.Context) *apis.FieldError

type WorkspaceBinding

type WorkspaceBinding struct {
	// Name is the name of the workspace populated by the volume.
	Name string `json:"name"`
	// SubPath is optionally a directory on the volume which should be used
	// for this binding (i.e. the volume will be mounted at this sub directory).
	// +optional
	SubPath string `json:"subPath,omitempty"`
	// VolumeClaimTemplate is a template for a claim that will be created in the same namespace.
	// The PipelineRun controller is responsible for creating a unique claim for each instance of PipelineRun.
	// +optional
	VolumeClaimTemplate *corev1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
	// PersistentVolumeClaimVolumeSource represents a reference to a
	// PersistentVolumeClaim in the same namespace. Either this OR EmptyDir can be used.
	// +optional
	PersistentVolumeClaim *corev1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
	// EmptyDir represents a temporary directory that shares a Task's lifetime.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
	// Either this OR PersistentVolumeClaim can be used.
	// +optional
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
	// ConfigMap represents a configMap that should populate this workspace.
	// +optional
	ConfigMap *corev1.ConfigMapVolumeSource `json:"configMap,omitempty"`
	// Secret represents a secret that should populate this workspace.
	// +optional
	Secret *corev1.SecretVolumeSource `json:"secret,omitempty"`
}

WorkspaceBinding maps a Task's declared workspace to a Volume.

func (*WorkspaceBinding) DeepCopy

func (in *WorkspaceBinding) DeepCopy() *WorkspaceBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceBinding.

func (*WorkspaceBinding) DeepCopyInto

func (in *WorkspaceBinding) DeepCopyInto(out *WorkspaceBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkspaceBinding) Validate

func (b *WorkspaceBinding) Validate(ctx context.Context) *apis.FieldError

Validate looks at the Volume provided in wb and makes sure that it is valid. This means that only one VolumeSource can be specified, and also that the supported VolumeSource is itself valid.

type WorkspaceDeclaration

type WorkspaceDeclaration struct {
	// Name is the name by which you can bind the volume at runtime.
	Name string `json:"name"`
	// Description is an optional human readable description of this volume.
	// +optional
	Description string `json:"description,omitempty"`
	// MountPath overrides the directory that the volume will be made available at.
	// +optional
	MountPath string `json:"mountPath,omitempty"`
	// ReadOnly dictates whether a mounted volume is writable. By default this
	// field is false and so mounted volumes are writable.
	ReadOnly bool `json:"readOnly,omitempty"`
}

WorkspaceDeclaration is a declaration of a volume that a Task requires.

func (*WorkspaceDeclaration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceDeclaration.

func (*WorkspaceDeclaration) DeepCopyInto

func (in *WorkspaceDeclaration) DeepCopyInto(out *WorkspaceDeclaration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkspaceDeclaration) GetMountPath

func (w *WorkspaceDeclaration) GetMountPath() string

GetMountPath returns the mountPath for w which is the MountPath if provided or the default if not.

type WorkspacePipelineDeclaration

type WorkspacePipelineDeclaration = PipelineWorkspaceDeclaration

WorkspacePipelineDeclaration creates a named slot in a Pipeline that a PipelineRun is expected to populate with a workspace binding. Deprecated: use PipelineWorkspaceDeclaration type instead

type WorkspacePipelineTaskBinding

type WorkspacePipelineTaskBinding struct {
	// Name is the name of the workspace as declared by the task
	Name string `json:"name"`
	// Workspace is the name of the workspace declared by the pipeline
	Workspace string `json:"workspace"`
	// SubPath is optionally a directory on the volume which should be used
	// for this binding (i.e. the volume will be mounted at this sub directory).
	// +optional
	SubPath string `json:"subPath,omitempty"`
}

WorkspacePipelineTaskBinding describes how a workspace passed into the pipeline should be mapped to a task's declared workspace.

func (*WorkspacePipelineTaskBinding) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspacePipelineTaskBinding.

func (*WorkspacePipelineTaskBinding) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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