v1alpha1

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 18 Imported by: 416

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the pipeline v1alpha1 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

Index

Constants

This section is empty.

Variables

View Source
var (

	// AddToScheme adds Build types to the scheme.
	AddToScheme = schemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: pipeline.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type EmbeddedRunSpec added in v0.25.0

type EmbeddedRunSpec struct {
	runtime.TypeMeta `json:",inline"`

	// +optional
	Metadata v1beta1.PipelineTaskMetadata `json:"metadata,omitempty"`

	// Spec is a specification of a custom task
	// +optional
	Spec runtime.RawExtension `json:"spec,omitempty"`
}

EmbeddedRunSpec allows custom task definitions to be embedded

func (*EmbeddedRunSpec) DeepCopy added in v0.25.0

func (in *EmbeddedRunSpec) DeepCopy() *EmbeddedRunSpec

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

func (*EmbeddedRunSpec) DeepCopyInto added in v0.25.0

func (in *EmbeddedRunSpec) DeepCopyInto(out *EmbeddedRunSpec)

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

type Run added in v0.15.0

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

	// +optional
	Spec RunSpec `json:"spec,omitempty"`
	// +optional
	Status RunStatus `json:"status,omitempty"`
}

Run represents a single execution of a Custom Task.

+k8s:openapi-gen=true

func (*Run) DeepCopy added in v0.15.0

func (in *Run) DeepCopy() *Run

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

func (*Run) DeepCopyInto added in v0.15.0

func (in *Run) DeepCopyInto(out *Run)

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

func (*Run) DeepCopyObject added in v0.15.0

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

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

func (*Run) GetConditionSet added in v0.15.0

func (r *Run) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*Run) GetGroupVersionKind added in v0.27.0

func (*Run) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind implements kmeta.OwnerRefable.

func (*Run) GetRunKey added in v0.15.0

func (r *Run) GetRunKey() string

GetRunKey return the run's key for timeout handler map

func (*Run) GetStatus added in v0.15.0

func (r *Run) GetStatus() *duckv1.Status

GetStatus retrieves the status of the Parallel. Implements the KRShaped interface.

func (*Run) GetStatusCondition added in v0.34.0

func (r *Run) GetStatusCondition() apis.ConditionAccessor

GetStatusCondition returns the task run status as a ConditionAccessor

func (*Run) GetTimeout added in v0.27.0

func (r *Run) GetTimeout() time.Duration

GetTimeout returns the timeout for this run, or the default if not configured

func (*Run) HasPipelineRunOwnerReference added in v0.15.0

func (r *Run) HasPipelineRunOwnerReference() bool

HasPipelineRunOwnerReference returns true of Run has owner reference of type PipelineRun

func (*Run) HasStarted added in v0.15.0

func (r *Run) HasStarted() bool

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

func (*Run) HasTimedOut added in v0.27.0

func (r *Run) HasTimedOut(c clock.PassiveClock) bool

HasTimedOut returns true if the Run's running time is beyond the allowed timeout

func (*Run) IsCancelled added in v0.17.0

func (r *Run) IsCancelled() bool

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

func (*Run) IsDone added in v0.15.0

func (r *Run) IsDone() bool

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

func (*Run) IsSuccessful added in v0.15.0

func (r *Run) IsSuccessful() bool

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

func (*Run) SetDefaults added in v0.15.0

func (r *Run) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*Run) SupportedVerbs added in v0.41.0

func (r *Run) SupportedVerbs() []admissionregistrationv1.OperationType

SupportedVerbs returns the operations that validation should be called for

func (*Run) Validate added in v0.15.0

func (r *Run) Validate(ctx context.Context) *apis.FieldError

Validate taskrun

type RunList added in v0.15.0

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

RunList contains a list of Run

func (*RunList) DeepCopy added in v0.15.0

func (in *RunList) DeepCopy() *RunList

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

func (*RunList) DeepCopyInto added in v0.15.0

func (in *RunList) DeepCopyInto(out *RunList)

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

func (*RunList) DeepCopyObject added in v0.15.0

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

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

type RunReason added in v0.42.0

type RunReason string

RunReason is an enum used to store all Run reason for the Succeeded condition that are controlled by the Run itself.

const (
	// RunReasonStarted is the reason set when the Run has just started.
	RunReasonStarted RunReason = "Started"
	// RunReasonRunning is the reason set when the Run is running.
	RunReasonRunning RunReason = "Running"
	// RunReasonSuccessful is the reason set when the Run completed successfully.
	RunReasonSuccessful RunReason = "Succeeded"
	// RunReasonFailed is the reason set when the Run completed with a failure.
	RunReasonFailed RunReason = "Failed"
	// RunReasonCancelled must be used in the Condition Reason to indicate that a Run was cancelled.
	RunReasonCancelled RunReason = "RunCancelled"
	// RunReasonTimedOut must be used in the Condition Reason to indicate that a Run was timed out.
	RunReasonTimedOut RunReason = "RunTimedOut"
	// RunReasonWorkspaceNotSupported can be used in the Condition Reason to indicate that the
	// Run contains a workspace which is not supported by this custom task.
	RunReasonWorkspaceNotSupported RunReason = "RunWorkspaceNotSupported"
	// RunReasonPodTemplateNotSupported can be used in the Condition Reason to indicate that the
	// Run contains a pod template which is not supported by this custom task.
	RunReasonPodTemplateNotSupported RunReason = "RunPodTemplateNotSupported"
)

func (RunReason) String added in v0.42.0

func (t RunReason) String() string

type RunResult added in v0.19.0

type RunResult = runv1alpha1.RunResult

RunResult used to describe the results of a task

type RunSpec added in v0.15.0

type RunSpec struct {
	// +optional
	Ref *v1beta1.TaskRef `json:"ref,omitempty"`

	// Spec is a specification of a custom task
	// +optional
	Spec *EmbeddedRunSpec `json:"spec,omitempty"`

	// +optional
	Params []v1beta1.Param `json:"params,omitempty"`

	// Used for cancelling a run (and maybe more later on)
	// +optional
	Status RunSpecStatus `json:"status,omitempty"`

	// Status message for cancellation.
	// +optional
	StatusMessage RunSpecStatusMessage `json:"statusMessage,omitempty"`

	// Used for propagating retries count to custom tasks
	// +optional
	Retries int `json:"retries,omitempty"`

	// +optional
	ServiceAccountName string `json:"serviceAccountName"`

	// PodTemplate holds pod specific configuration
	// +optional
	PodTemplate *pod.PodTemplate `json:"podTemplate,omitempty"`

	// Time after which the custom-task times out.
	// Refer Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`

	// Workspaces is a list of WorkspaceBindings from volumes to workspaces.
	// +optional
	Workspaces []v1beta1.WorkspaceBinding `json:"workspaces,omitempty"`
}

RunSpec defines the desired state of Run

func (*RunSpec) DeepCopy added in v0.15.0

func (in *RunSpec) DeepCopy() *RunSpec

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

func (*RunSpec) DeepCopyInto added in v0.15.0

func (in *RunSpec) DeepCopyInto(out *RunSpec)

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

func (RunSpec) GetParam added in v0.15.0

func (rs RunSpec) GetParam(name string) *v1beta1.Param

GetParam gets the Param from the RunSpec with the given name TODO(jasonhall): Move this to a Params type so other code can use it?

func (*RunSpec) SetDefaults added in v0.15.0

func (rs *RunSpec) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*RunSpec) Validate added in v0.15.0

func (rs *RunSpec) Validate(ctx context.Context) *apis.FieldError

Validate Run spec

type RunSpecStatus added in v0.17.0

type RunSpecStatus string

RunSpecStatus defines the taskrun spec status the user can provide

const (
	// RunSpecStatusCancelled indicates that the user wants to cancel the run,
	// if not already cancelled or terminated
	RunSpecStatusCancelled RunSpecStatus = "RunCancelled"
)

type RunSpecStatusMessage added in v0.39.0

type RunSpecStatusMessage string

RunSpecStatusMessage defines human readable status messages for the TaskRun.

const (
	// RunCancelledByPipelineMsg indicates that the PipelineRun of which part this Run was
	// has been cancelled.
	RunCancelledByPipelineMsg RunSpecStatusMessage = "Run cancelled as the PipelineRun it belongs to has been cancelled."
	// RunCancelledByPipelineTimeoutMsg indicates that the Run was cancelled because the PipelineRun running it timed out.
	RunCancelledByPipelineTimeoutMsg RunSpecStatusMessage = "Run cancelled as the PipelineRun it belongs to has timed out."
)

type RunStatus added in v0.15.0

type RunStatus = runv1alpha1.RunStatus

RunStatus defines the observed state of Run.

type RunStatusFields added in v0.15.0

type RunStatusFields = runv1alpha1.RunStatusFields

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

Jump to

Keyboard shortcuts

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