v1alpha1

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

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

View Source
const (
	// BucketConfigName is the name of the configmap containing all
	// customizations for the storage bucket.
	BucketConfigName = "config-artifact-bucket"

	// BucketLocationKey is the name of the configmap entry that specifies
	// loction of the bucket.
	BucketLocationKey = "location"

	// BucketServiceAccountSecretName is the name of the configmap entry that specifies
	// the name of the secret that will provide the servie account with bucket access.
	// This secret must  have a key called serviceaccount that will have a value with
	// the service account with access to the bucket
	BucketServiceAccountSecretName = "bucket.service.account.secret.name"

	// BucketServiceAccountSecretKey is the name of the configmap entry that specifies
	// the secret key that will have a value with the service account json with access
	// to the bucket
	BucketServiceAccountSecretKey = "bucket.service.account.secret.key"
)
View Source
const (
	// PipelineResourceTypeGit indicates that this source is a GitHub repo.
	ArtifactStorageBucketType = "bucket"

	// PipelineResourceTypeStorage indicates that this source is a storage blob resource.
	ArtifactStoragePVCType = "pvc"
)
View Source
const (
	// PipelineRunSpecStatusCancelled indicates that the user wants to cancel the task,
	// if not already cancelled or terminated
	PipelineRunSpecStatusCancelled = "PipelineRunCancelled"
)
View Source
const (
	// ResultTargetTypeGCS indicates that the URL endpoint is a GCS bucket.
	ResultTargetTypeGCS = "gcs"
)
View Source
const (
	// TaskRunSpecStatusCancelled indicates that the user wants to cancel the task,
	// if not already cancelled or terminated
	TaskRunSpecStatusCancelled = "TaskRunCancelled"
)

Variables

View Source
var (

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

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

View Source
var AllResultTargetTypes = []ResultTargetType{ResultTargetTypeGCS}

AllResultTargetTypes is a list of all ResultTargetTypes, used for validation

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: pipeline.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func CreateDirContainer

func CreateDirContainer(name, destinationPath string) corev1.Container

CreateDirContainer returns a container step to create a dir

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

func ValidateVolumes added in v0.2.0

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

Types

type ArtifactBucket

type ArtifactBucket struct {
	Name     string
	Location string
	Secrets  []SecretParam
}

ArtifactBucket contains the Storage bucket configuration defined in the Bucket config map.

func (*ArtifactBucket) DeepCopy

func (in *ArtifactBucket) DeepCopy() *ArtifactBucket

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

func (*ArtifactBucket) DeepCopyInto

func (in *ArtifactBucket) DeepCopyInto(out *ArtifactBucket)

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

func (*ArtifactBucket) GetCopyFromContainerSpec

func (b *ArtifactBucket) GetCopyFromContainerSpec(name, sourcePath, destinationPath string) []corev1.Container

GetCopyFromContainerSpec returns a container used to download artifacts from temporary storage

func (*ArtifactBucket) GetCopyToContainerSpec

func (b *ArtifactBucket) GetCopyToContainerSpec(name, sourcePath, destinationPath string) []corev1.Container

GetCopyToContainerSpec returns a container used to upload artifacts for temporary storage

func (*ArtifactBucket) GetSecretsVolumes

func (b *ArtifactBucket) GetSecretsVolumes() []corev1.Volume

GetSecretsVolumes returns the list of volumes for secrets to be mounted on pod

func (*ArtifactBucket) GetType

func (b *ArtifactBucket) GetType() string

GetType returns the type of the artifact storage

func (*ArtifactBucket) StorageBasePath

func (b *ArtifactBucket) StorageBasePath(pr *PipelineRun) string

StorageBasePath returns the path to be used to store artifacts in a pipelinerun temporary storage

type ArtifactPVC

type ArtifactPVC struct {
	Name string
}

ArtifactPVC represents the pvc created by the pipelinerun for artifacts temporary storage

func (*ArtifactPVC) DeepCopy

func (in *ArtifactPVC) DeepCopy() *ArtifactPVC

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

func (*ArtifactPVC) DeepCopyInto

func (in *ArtifactPVC) DeepCopyInto(out *ArtifactPVC)

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

func (*ArtifactPVC) GetCopyFromContainerSpec

func (p *ArtifactPVC) GetCopyFromContainerSpec(name, sourcePath, destinationPath string) []corev1.Container

GetCopyFromContainerSpec returns a container used to download artifacts from temporary storage

func (*ArtifactPVC) GetCopyToContainerSpec

func (p *ArtifactPVC) GetCopyToContainerSpec(name, sourcePath, destinationPath string) []corev1.Container

GetCopyToContainerSpec returns a container used to upload artifacts for temporary storage

func (*ArtifactPVC) GetSecretsVolumes

func (p *ArtifactPVC) GetSecretsVolumes() []corev1.Volume

GetSecretsVolumes returns the list of volumes for secrets to be mounted on pod

func (*ArtifactPVC) GetType

func (p *ArtifactPVC) GetType() string

GetType returns the type of the artifact storage

func (*ArtifactPVC) StorageBasePath

func (p *ArtifactPVC) StorageBasePath(pr *PipelineRun) string

StorageBasePath returns the path to be used to store artifacts in a pipelinerun temporary storage

type BuildGCSResource

type BuildGCSResource struct {
	Name           string
	Type           PipelineResourceType
	Location       string
	DestinationDir string
	ArtifactType   GCSArtifactType
}

func NewBuildGCSResource

func NewBuildGCSResource(r *PipelineResource) (*BuildGCSResource, error)

NewBuildGCSResource creates a new BuildGCS resource to pass to a Task

func (*BuildGCSResource) DeepCopy

func (in *BuildGCSResource) DeepCopy() *BuildGCSResource

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

func (*BuildGCSResource) DeepCopyInto

func (in *BuildGCSResource) DeepCopyInto(out *BuildGCSResource)

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

func (*BuildGCSResource) GetDownloadContainerSpec

func (s *BuildGCSResource) GetDownloadContainerSpec() ([]corev1.Container, error)

GetDownloadContainerSpec returns an array of container specs to download gcs storage object

func (BuildGCSResource) GetName

func (s BuildGCSResource) GetName() string

GetName returns the name of the resource

func (*BuildGCSResource) GetParams

func (s *BuildGCSResource) GetParams() []Param

GetParams get params

func (*BuildGCSResource) GetSecretParams

func (s *BuildGCSResource) GetSecretParams() []SecretParam

GetSecretParams returns the resource secret params

func (BuildGCSResource) GetType

GetType returns the type of the resource, in this case "storage"

func (*BuildGCSResource) GetUploadContainerSpec

func (s *BuildGCSResource) GetUploadContainerSpec() ([]corev1.Container, error)

GetUploadContainerSpec gets container spec for gcs resource to be uploaded like set environment variable from secret params and set volume mounts for those secrets

func (*BuildGCSResource) Replacements

func (s *BuildGCSResource) Replacements() map[string]string

Replacements is used for template replacement on an GCSResource inside of a Taskrun.

func (*BuildGCSResource) SetDestinationDirectory

func (s *BuildGCSResource) SetDestinationDirectory(destDir string)

SetDestinationDirectory sets the destination directory at runtime like where is the resource going to be copied to

type ClusterResource

type ClusterResource struct {
	Name string               `json:"name"`
	Type PipelineResourceType `json:"type"`
	// URL must be a host string
	URL      string `json:"url"`
	Revision string `json:"revision"`
	// Server requires Basic authentication
	Username string `json:"username"`
	Password string `json:"password"`
	// Server requires Bearer authentication. This client will not attempt to use
	// refresh tokens for an OAuth2 flow.
	// Token overrides userame and password
	Token string `json:"token"`
	// Server should be accessed without verifying the TLS certificate. For testing only.
	Insecure bool
	// CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
	// CAData takes precedence over CAFile
	CAData []byte `json:"cadata"`
	//Secrets holds a struct to indicate a field name and corresponding secret name to populate it
	Secrets []SecretParam `json:"secrets"`
}

ClusterResource represents a cluster configuration (kubeconfig) that can be accessed by tasks in the pipeline

func NewClusterResource

func NewClusterResource(r *PipelineResource) (*ClusterResource, error)

NewClusterResource create a new k8s cluster resource to pass to a pipeline task

func (*ClusterResource) DeepCopy

func (in *ClusterResource) DeepCopy() *ClusterResource

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

func (*ClusterResource) DeepCopyInto

func (in *ClusterResource) DeepCopyInto(out *ClusterResource)

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

func (*ClusterResource) GetDownloadContainerSpec

func (s *ClusterResource) GetDownloadContainerSpec() ([]corev1.Container, error)

func (ClusterResource) GetName

func (s ClusterResource) GetName() string

GetName returns the name of the resource

func (ClusterResource) GetParams

func (s ClusterResource) GetParams() []Param

GetParams returns the resource params

func (ClusterResource) GetType

GetType returns the type of the resource, in this case "cluster"

func (*ClusterResource) GetURL

func (s *ClusterResource) GetURL() string

GetURL returns the url to be used with this resource

func (*ClusterResource) GetUploadContainerSpec

func (s *ClusterResource) GetUploadContainerSpec() ([]corev1.Container, error)

func (*ClusterResource) Replacements

func (s *ClusterResource) Replacements() map[string]string

Replacements is used for template replacement on a ClusterResource inside of a Taskrun.

func (*ClusterResource) SetDestinationDirectory

func (s *ClusterResource) SetDestinationDirectory(path string)

func (ClusterResource) String

func (s ClusterResource) String() string

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

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 DAG added in v0.2.0

type DAG struct {
	//Nodes represent map of PipelineTask name to Node in Pipeline DAG
	Nodes map[string]*Node
}

DAG represents the Pipeline DAG

func BuildDAG added in v0.2.0

func BuildDAG(tasks []PipelineTask) (*DAG, error)

BuildDAG returns a valid pipeline DAG. Returns error if the pipeline is invalid

func (*DAG) DeepCopy added in v0.2.0

func (in *DAG) DeepCopy() *DAG

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

func (*DAG) DeepCopyInto added in v0.2.0

func (in *DAG) DeepCopyInto(out *DAG)

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

type GCSArtifactType

type GCSArtifactType string

GCSArtifactType defines a type of GCS resource.

const (
	// GCSArchive indicates that resource should be fetched from a typical archive file.
	GCSArchive GCSArtifactType = "Archive"

	// GCSManifest indicates that resource should be fetched using a
	// manifest-based protocol which enables incremental source upload.
	GCSManifest GCSArtifactType = "Manifest"

	// EmptyArtifactType indicates, no artifact type is specified.
	EmptyArtifactType = ""
)

type GCSResource

type GCSResource struct {
	Name           string               `json:"name"`
	Type           PipelineResourceType `json:"type"`
	Location       string               `json:"location"`
	TypeDir        bool                 `json:"typeDir"`
	DestinationDir string               `json:"destinationDir"`
	//Secret holds a struct to indicate a field name and corresponding secret name to populate it
	Secrets []SecretParam `json:"secrets"`
}

GCSResource is a GCS endpoint from which to get artifacts which is required by a Build/Task for context (e.g. a archive from which to build an image).

func NewGCSResource

func NewGCSResource(r *PipelineResource) (*GCSResource, error)

NewGCSResource creates a new GCS resource to pass to a Task

func (*GCSResource) DeepCopy

func (in *GCSResource) DeepCopy() *GCSResource

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

func (*GCSResource) DeepCopyInto

func (in *GCSResource) DeepCopyInto(out *GCSResource)

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

func (*GCSResource) GetDownloadContainerSpec

func (s *GCSResource) GetDownloadContainerSpec() ([]corev1.Container, error)

GetDownloadContainerSpec returns an array of container specs to download gcs storage object

func (GCSResource) GetName

func (s GCSResource) GetName() string

GetName returns the name of the resource

func (*GCSResource) GetParams

func (s *GCSResource) GetParams() []Param

GetParams get params

func (*GCSResource) GetSecretParams

func (s *GCSResource) GetSecretParams() []SecretParam

GetSecretParams returns the resource secret params

func (GCSResource) GetType

func (s GCSResource) GetType() PipelineResourceType

GetType returns the type of the resource, in this case "storage"

func (*GCSResource) GetUploadContainerSpec

func (s *GCSResource) GetUploadContainerSpec() ([]corev1.Container, error)

GetUploadContainerSpec gets container spec for gcs resource to be uploaded like set environment variable from secret params and set volume mounts for those secrets

func (*GCSResource) Replacements

func (s *GCSResource) Replacements() map[string]string

Replacements is used for template replacement on an GCSResource inside of a Taskrun.

func (*GCSResource) SetDestinationDirectory

func (s *GCSResource) SetDestinationDirectory(destDir string)

SetDestinationDirectory sets the destination directory at runtime like where is the resource going to be copied to

type GitResource

type GitResource struct {
	Name string               `json:"name"`
	Type PipelineResourceType `json:"type"`
	URL  string               `json:"url"`
	// Git revision (branch, tag, commit SHA or ref) to clone.  See
	// https://git-scm.com/docs/gitrevisions#_specifying_revisions for more
	// information.
	Revision   string `json:"revision"`
	TargetPath string
}

GitResource is an endpoint from which to get data which is required by a Build/Task for context (e.g. a repo from which to build an image).

func NewGitResource

func NewGitResource(r *PipelineResource) (*GitResource, error)

NewGitResource create a new git resource to pass to a Task

func (*GitResource) DeepCopy

func (in *GitResource) DeepCopy() *GitResource

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

func (*GitResource) DeepCopyInto

func (in *GitResource) DeepCopyInto(out *GitResource)

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

func (*GitResource) GetDownloadContainerSpec

func (s *GitResource) GetDownloadContainerSpec() ([]corev1.Container, error)

func (GitResource) GetName

func (s GitResource) GetName() string

GetName returns the name of the resource

func (GitResource) GetParams

func (s GitResource) GetParams() []Param

GetParams returns the resource params

func (GitResource) GetType

func (s GitResource) GetType() PipelineResourceType

GetType returns the type of the resource, in this case "Git"

func (*GitResource) GetURL

func (s *GitResource) GetURL() string

GetURL returns the url to be used with this resource

func (*GitResource) GetUploadContainerSpec

func (s *GitResource) GetUploadContainerSpec() ([]corev1.Container, error)

func (*GitResource) Replacements

func (s *GitResource) Replacements() map[string]string

Replacements is used for template replacement on a GitResource inside of a Taskrun.

func (*GitResource) SetDestinationDirectory

func (s *GitResource) SetDestinationDirectory(path string)

type ImageResource

type ImageResource struct {
	Name   string               `json:"name"`
	Type   PipelineResourceType `json:"type"`
	URL    string               `json:"url"`
	Digest string               `json:"digest"`
}

ImageResource defines an endpoint where artifacts can be stored, such as images.

func NewImageResource

func NewImageResource(r *PipelineResource) (*ImageResource, error)

NewImageResource creates a new ImageResource from a PipelineResource.

func (*ImageResource) DeepCopy

func (in *ImageResource) DeepCopy() *ImageResource

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

func (*ImageResource) DeepCopyInto

func (in *ImageResource) DeepCopyInto(out *ImageResource)

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

func (*ImageResource) GetDownloadContainerSpec

func (s *ImageResource) GetDownloadContainerSpec() ([]corev1.Container, error)

func (ImageResource) GetName

func (s ImageResource) GetName() string

GetName returns the name of the resource

func (ImageResource) GetParams

func (s ImageResource) GetParams() []Param

GetParams returns the resource params

func (ImageResource) GetType

func (s ImageResource) GetType() PipelineResourceType

GetType returns the type of the resource, in this case "image"

func (*ImageResource) GetUploadContainerSpec

func (s *ImageResource) GetUploadContainerSpec() ([]corev1.Container, error)

func (*ImageResource) Replacements

func (s *ImageResource) Replacements() map[string]string

Replacements is used for template replacement on an ImageResource inside of a Taskrun.

func (*ImageResource) SetDestinationDirectory

func (s *ImageResource) SetDestinationDirectory(path string)

type Inputs

type Inputs struct {
	// +optional
	Resources []TaskResource `json:"resources,omitempty"`
	// +optional
	Params []TaskParam `json:"params,omitempty"`
}

Inputs are the requirements that a task needs to run a Build.

func (*Inputs) DeepCopy

func (in *Inputs) DeepCopy() *Inputs

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

func (*Inputs) DeepCopyInto

func (in *Inputs) DeepCopyInto(out *Inputs)

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

type Node added in v0.2.0

type Node struct {
	// Task represent the PipelineTask in Pipeline
	Task PipelineTask
	// Prev represent all the Previous task Nodes for the current Task
	Prev []*Node
	// Next represent all the Next task Nodes for the current Task
	Next []*Node
}

Node represents a Task in a pipeline.

func (*Node) DeepCopy added in v0.2.0

func (in *Node) DeepCopy() *Node

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

func (*Node) DeepCopyInto added in v0.2.0

func (in *Node) DeepCopyInto(out *Node)

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

type Outputs

type Outputs struct {
	// +optional
	Results []TestResult `json:"results,omitempty"`
	// +optional
	Resources []TaskResource `json:"resources,omitempty"`
}

Outputs allow a task to declare what data the Build/Task will be producing, i.e. results such as logs and artifacts such as images.

func (*Outputs) DeepCopy

func (in *Outputs) DeepCopy() *Outputs

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

func (*Outputs) DeepCopyInto

func (in *Outputs) DeepCopyInto(out *Outputs)

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

type Param

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

Param declares a value to use for the Param 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 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"`
	// Status communicates the observed state of the Pipeline form the controller
	// +optional
	Status PipelineStatus `json:"status"`
}

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) 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) 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"`
}

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 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 PipelineParam

type PipelineParam struct {
	Name string `json:"name"`
	// +optional
	Description string `json:"description,omitempty"`
	// +optional
	Default string `json:"default,omitempty"`
}

PipelineParam defines arbitrary parameters needed by a pipeline beyond typed inputs such as resources.

func (*PipelineParam) DeepCopy

func (in *PipelineParam) DeepCopy() *PipelineParam

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

func (*PipelineParam) DeepCopyInto

func (in *PipelineParam) DeepCopyInto(out *PipelineParam)

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

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 PipelineResource

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

	// Spec holds the desired state of the PipelineResource from the client
	// +optional
	Spec PipelineResourceSpec `json:"spec,omitempty"`
	// Status communicates the observed state of the PipelineResource from the controller
	// +optional
	Status PipelineResourceStatus `json:"status,omitempty"`
}

PipelineResource is the Schema for the pipelineResources API +k8s:openapi-gen=true

func (*PipelineResource) DeepCopy

func (in *PipelineResource) DeepCopy() *PipelineResource

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

func (*PipelineResource) DeepCopyInto

func (in *PipelineResource) DeepCopyInto(out *PipelineResource)

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

func (*PipelineResource) DeepCopyObject

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

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

func (*PipelineResource) SetDefaults

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

func (*PipelineResource) Validate

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

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
	ResourceRef PipelineResourceRef `json:"resourceRef,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

type PipelineResourceInterface interface {
	GetName() string
	GetType() PipelineResourceType
	GetParams() []Param
	Replacements() map[string]string
	GetDownloadContainerSpec() ([]corev1.Container, error)
	GetUploadContainerSpec() ([]corev1.Container, error)
	SetDestinationDirectory(string)
}

PipelineResourceInterface interface to be implemented by different PipelineResource types

func ResourceFromType

func ResourceFromType(r *PipelineResource) (PipelineResourceInterface, error)

ResourceFromType returns a PipelineResourceInterface from a PipelineResource's type.

type PipelineResourceList

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

PipelineResourceList contains a list of PipelineResources

func (*PipelineResourceList) DeepCopy

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

func (*PipelineResourceList) DeepCopyInto

func (in *PipelineResourceList) DeepCopyInto(out *PipelineResourceList)

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

func (*PipelineResourceList) DeepCopyObject

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

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

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 PipelineResourceSpec

type PipelineResourceSpec struct {
	Type   PipelineResourceType `json:"type"`
	Params []Param              `json:"params"`
	// Secrets to fetch to populate some of resource fields
	// +optional
	SecretParams []SecretParam `json:"secrets,omitempty"`
}

PipelineResourceSpec defines an individual resources used in the pipeline.

func (*PipelineResourceSpec) DeepCopy

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

func (*PipelineResourceSpec) DeepCopyInto

func (in *PipelineResourceSpec) DeepCopyInto(out *PipelineResourceSpec)

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

func (*PipelineResourceSpec) SetDefaults

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

func (*PipelineResourceSpec) Validate

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

type PipelineResourceStatus

type PipelineResourceStatus struct {
}

PipelineResourceStatus does not contain anything because Resources on their own do not have a status, they just hold data which is later used by PipelineRuns and TaskRuns.

func (*PipelineResourceStatus) DeepCopy

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

func (*PipelineResourceStatus) DeepCopyInto

func (in *PipelineResourceStatus) DeepCopyInto(out *PipelineResourceStatus)

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

type PipelineResourceStorageType

type PipelineResourceStorageType string

type PipelineResourceType

type PipelineResourceType string

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 = "git"

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

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

	// PipelineResourceTypeCluster indicates that this source is a k8s cluster Image.
	PipelineResourceTypeCluster PipelineResourceType = "cluster"
)
const (
	// PipelineResourceTypeGCS indicates that resource source is a GCS blob/directory.
	PipelineResourceTypeGCS      PipelineResourceType = "gcs"
	PipelineResourceTypeBuildGCS PipelineResourceType = "build-gcs"
)

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 is the Schema for the pipelineruns API +k8s:openapi-gen=true

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) GetOwnerReference

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

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

func (*PipelineRun) GetRunKey added in v0.2.0

func (pr *PipelineRun) GetRunKey() string

GetRunKey return the pipelinerun key for timeout handler map

func (*PipelineRun) GetTaskRunRef

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

GetTaskRunRef for pipelinerun

func (*PipelineRun) HasStarted added in v0.2.0

func (pr *PipelineRun) HasStarted() bool

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

func (*PipelineRun) IsCancelled added in v0.2.0

func (pr *PipelineRun) IsCancelled() bool

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

func (*PipelineRun) IsDone added in v0.2.0

func (pr *PipelineRun) IsDone() bool

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

func (*PipelineRun) SetDefaults

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

SetDefaults for pipelinerun

func (*PipelineRun) Validate

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

Validate pipelinerun

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 PipelineRunSpec

type PipelineRunSpec struct {
	PipelineRef PipelineRef     `json:"pipelineRef"`
	Trigger     PipelineTrigger `json:"trigger"`
	// 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
	ServiceAccount string `json:"serviceAccount"`
	// +optional
	Results *Results `json:"results,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 Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration
	// +optional
	Timeout *metav1.Duration `json:"timeout,omitempty"`
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,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) Validate

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

Validate pipelinerun spec

type PipelineRunSpecStatus

type PipelineRunSpecStatus string

PipelineRunSpecStatus defines the pipelinerun spec status the user can provide

type PipelineRunStatus

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

	// In #107 should be updated to hold the location logs have been uploaded to
	// +optional
	Results *Results `json:"results,omitempty"`

	// 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"`
}

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) SetCondition

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

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

type PipelineRunTaskRunStatus added in v0.2.0

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"`
}

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

func (*PipelineRunTaskRunStatus) DeepCopy added in v0.2.0

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

func (*PipelineRunTaskRunStatus) DeepCopyInto added in v0.2.0

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 {
	Resources []PipelineDeclaredResource `json:"resources,omitempty"`
	Tasks     []PipelineTask             `json:"tasks,omitempty"`
	Params    []PipelineParam            `json:"params,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 PipelineStatus

type PipelineStatus struct {
}

PipelineStatus does not contain anything because Pipelines on their own do not have a status, they just hold data which is later used by a PipelineRun.

func (*PipelineStatus) DeepCopy

func (in *PipelineStatus) DeepCopy() *PipelineStatus

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

func (*PipelineStatus) DeepCopyInto

func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus)

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

type PipelineStorageResourceInterface

type PipelineStorageResourceInterface interface {
	PipelineResourceInterface
	GetSecretParams() []SecretParam
}

PipelineResourceInterface interface to be implemented by different PipelineResource types

type PipelineTask

type PipelineTask struct {
	Name    string  `json:"name,omitempty"`
	TaskRef TaskRef `json:"taskRef"`

	// 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"`

	// +optional
	Resources *PipelineTaskResources `json:"resources,omitempty"`
	// +optional
	Params []Param `json:"params,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.

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 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 DeclaredPipelienResource 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 PipelineTrigger

type PipelineTrigger struct {
	Type PipelineTriggerType `json:"type,omitempty"`
	// +optional
	Name string `json:"name,omitempty"`
}

PipelineTrigger describes what triggered this Pipeline to run. It could be triggered manually, or it could have been some kind of external event (not yet designed).

func (*PipelineTrigger) DeepCopy

func (in *PipelineTrigger) DeepCopy() *PipelineTrigger

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

func (*PipelineTrigger) DeepCopyInto

func (in *PipelineTrigger) DeepCopyInto(out *PipelineTrigger)

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

type PipelineTriggerType

type PipelineTriggerType string

PipelineTriggerType indicates the mechanism by which this PipelineRun was created.

const (
	// PipelineTriggerTypeManual indicates that this PipelineRun was invoked manually by a user.
	PipelineTriggerTypeManual PipelineTriggerType = "manual"
)

type ResultTargetType

type ResultTargetType string

ResultTargetType represents the type of endpoint that this result target is, so that the controller will know how to write results to it.

type Results

type Results struct {
	Type ResultTargetType `json:"type"`
	URL  string           `json:"url"`
}

Results is used to identify an endpoint where results can be uploaded. The serviceaccount used for the pipeline must have access to this endpoint.

func (*Results) DeepCopy

func (in *Results) DeepCopy() *Results

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

func (*Results) DeepCopyInto

func (in *Results) DeepCopyInto(out *Results)

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

func (*Results) Validate

func (r *Results) Validate(ctx context.Context, path string) *apis.FieldError

Validate will validate the result configuration. The path is the path at which we found this instance of `Results` (since it is probably a member of another structure) and will be used to report any errors.

type SecretParam

type SecretParam struct {
	FieldName  string `json:"fieldName"`
	SecretKey  string `json:"secretKey"`
	SecretName string `json:"secretName"`
}

SecretParam indicates which secret can be used to populate a field of the resource

func (*SecretParam) DeepCopy

func (in *SecretParam) DeepCopy() *SecretParam

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

func (*SecretParam) DeepCopyInto

func (in *SecretParam) DeepCopyInto(out *SecretParam)

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

type StepState

type StepState struct {
	corev1.ContainerState
	Name string `json:"name,omitempty"`
}

StepState reports the results of running a step in the 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 is the Schema for the tasks API +k8s:openapi-gen=true

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

TaskKind defines the type of Task used by the pipeline.

const (
	// NamespacedTaskKind indicates that the task type has a namepace 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"`
}

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 TaskParam

type TaskParam struct {
	Name string `json:"name"`
	// +optional
	Description string `json:"description,omitempty"`
	// +optional
	Default string `json:"default,omitempty"`
}

TaskParam defines arbitrary parameters needed by a task beyond typed inputs such as resources.

func (*TaskParam) DeepCopy

func (in *TaskParam) DeepCopy() *TaskParam

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

func (*TaskParam) DeepCopyInto

func (in *TaskParam) DeepCopyInto(out *TaskParam)

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

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 inficates 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 {
	Name string               `json:"name"`
	Type PipelineResourceType `json:"type"`
	// +optional
	// TargetPath is the path in workspace directory where the task resource will be copied.
	TargetPath string `json:"targetPath"`
}

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 {
	Name string `json:"name"`
	// no more than one of the ResourceRef and ResourceSpec may be specified.
	// +optional
	ResourceRef PipelineResourceRef `json:"resourceRef,omitempty"`
	// +optional
	ResourceSpec *PipelineResourceSpec `json:"resourceSpec,omitempty"`
	// +optional
	Paths []string `json:"paths,omitempty"`
}

TaskResourceBinding points to the PipelineResource that will be used for the Task input or output called Name. 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).

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 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 is the Schema for the taskruns API +k8s:openapi-gen=true

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) GetPipelineRunPVCName

func (tr *TaskRun) GetPipelineRunPVCName() string

GetPipelineRunPVCName for taskrun gets pipelinerun

func (*TaskRun) GetRunKey added in v0.2.0

func (tr *TaskRun) GetRunKey() string

GetRunKey return the taskrun key for timeout handler map

func (*TaskRun) HasPipelineRunOwnerReference

func (tr *TaskRun) HasPipelineRunOwnerReference() bool

HasPipelineRunOwnerReference returns true of TaskRun has owner reference of type PipelineRun

func (*TaskRun) HasStarted added in v0.3.0

func (tr *TaskRun) HasStarted() bool

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

func (*TaskRun) IsCancelled added in v0.2.0

func (tr *TaskRun) IsCancelled() bool

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

func (*TaskRun) IsDone added in v0.2.0

func (tr *TaskRun) IsDone() bool

IsDone 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.

func (TaskRunInputs) Validate

func (i TaskRunInputs) Validate(ctx context.Context, path string) *apis.FieldError

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"`
	// +optional
	Params []Param `json:"params,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.

func (TaskRunOutputs) Validate

func (o TaskRunOutputs) Validate(ctx context.Context, path string) *apis.FieldError

type TaskRunSpec

type TaskRunSpec struct {
	Trigger TaskTrigger `json:"trigger,omitempty"`
	// +optional
	Inputs TaskRunInputs `json:"inputs,omitempty"`
	// +optional
	Outputs TaskRunOutputs `json:"outputs,omitempty"`
	// +optional
	Results *Results `json:"results,omitempty"`
	// +optional
	ServiceAccount string `json:"serviceAccount,omitempty"`
	// 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 10 minutes.
	// 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"`
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	// Selector which must match a node's labels for the pod to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,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"`

	// In #107 should be updated to hold the location logs have been uploaded to
	// +optional
	Results *Results `json:"results,omitempty"`

	// 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"`
}

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 (tr *TaskRunStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the Condition matching the given type.

func (*TaskRunStatus) InitializeConditions

func (tr *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) SetCondition

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

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

type TaskSpec

type TaskSpec struct {
	// +optional
	Inputs *Inputs `json:"inputs,omitempty"`
	// +optional
	Outputs *Outputs `json:"outputs,omitempty"`

	// Steps are the steps of the build; each step is run sequentially with the
	// source mounted into /workspace.
	Steps []corev1.Container `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"`

	// ContainerTemplate can be used as the basis for all step containers within the
	// Task, so that the steps inherit settings on the base container.
	ContainerTemplate *corev1.Container `json:"containerTemplate,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)

func (*TaskSpec) Validate

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

type TaskTrigger

type TaskTrigger struct {
	Type TaskTriggerType `json:"type"`
	// +optional
	Name string `json:"name,omitempty,omitempty"`
}

TaskTrigger describes what triggered this Task to run. It could be triggered manually, or it may have been part of a PipelineRun in which case this ref would refer to the corresponding PipelineRun.

func (*TaskTrigger) DeepCopy

func (in *TaskTrigger) DeepCopy() *TaskTrigger

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

func (*TaskTrigger) DeepCopyInto

func (in *TaskTrigger) DeepCopyInto(out *TaskTrigger)

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

func (TaskTrigger) Validate

func (r TaskTrigger) Validate(ctx context.Context, path string) *apis.FieldError

Validate validates that the task trigger is of a known type. If it was triggered by a PipelineRun, the name of the trigger should be the name of a PipelienRun.

type TaskTriggerType

type TaskTriggerType string

TaskTriggerType indicates the mechanism by which this TaskRun was created.

const (
	// TaskTriggerTypeManual indicates that this TaskRun was invoked manually by a user.
	TaskTriggerTypeManual TaskTriggerType = "manual"

	// TaskTriggerTypePipelineRun indicates that this TaskRun was created by a controller
	// attempting to realize a PipelineRun. In this case the `name` will refer to the name
	// of the PipelineRun.
	TaskTriggerTypePipelineRun TaskTriggerType = "pipelineRun"
)

type TestResult

type TestResult struct {
	Name string `json:"name"`
	// TODO: maybe this is an enum with types like "go test", "junit", etc.
	Format string `json:"format"`
	Path   string `json:"path"`
}

TestResult allows a task to specify the location where test logs can be found and what format they will be in.

func (*TestResult) DeepCopy

func (in *TestResult) DeepCopy() *TestResult

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

func (*TestResult) DeepCopyInto

func (in *TestResult) DeepCopyInto(out *TestResult)

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