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/resource +k8s:defaulter-gen=TypeMeta +groupName=tekton.dev
Index ¶
- Variables
- func AllowedStorageType(gotType string) bool
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type PipelineResource
- func (in *PipelineResource) DeepCopy() *PipelineResource
- func (in *PipelineResource) DeepCopyInto(out *PipelineResource)
- func (in *PipelineResource) DeepCopyObject() runtime.Object
- func (t *PipelineResource) SetDefaults(ctx context.Context)
- func (r *PipelineResource) Validate(ctx context.Context) *apis.FieldError
- type PipelineResourceList
- type PipelineResourceSpec
- type PipelineResourceStatus
- type PipelineResourceType
- type ResourceDeclaration
- type ResourceParam
- type SecretParam
Constants ¶
This section is empty.
Variables ¶
var (
// AddToScheme adds Build types to the scheme.
AddToScheme = schemeBuilder.AddToScheme
)
var AllResourceTypes = []PipelineResourceType{PipelineResourceTypeGit, PipelineResourceTypeStorage, PipelineResourceTypeImage, PipelineResourceTypePullRequest}
AllResourceTypes can be used for validation to check if a provided Resource type is one of the known types.
var ( // AllowedOutputResources are the resource types that can be used as outputs AllowedOutputResources = map[PipelineResourceType]bool{ PipelineResourceTypeStorage: true, PipelineResourceTypeGit: true, } )
var SchemeGroupVersion = schema.GroupVersion{Group: pipeline.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func AllowedStorageType ¶
AllowedStorageType returns true if the provided string can be used as a storage type, and false otherwise
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
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 Spec PipelineResourceSpec `json:"spec,omitempty"` // Status is deprecated. // It usually is used to communicate the observed state of the PipelineResource from // the controller, but was unused as there is no controller for PipelineResource. // +optional Status *PipelineResourceStatus `json:"status,omitempty"` }
PipelineResource describes a resource that is an input to or output from a Task.
+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)
SetDefaults implements api.Defaultable
func (*PipelineResource) Validate ¶
func (r *PipelineResource) Validate(ctx context.Context) *apis.FieldError
Validate validates the PipelineResource's ObjectMeta and Spec
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 ¶
func (in *PipelineResourceList) DeepCopy() *PipelineResourceList
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 PipelineResourceSpec ¶
type PipelineResourceSpec struct { // Description is a user-facing description of the resource that may be // used to populate a UI. // +optional Description string `json:"description,omitempty"` Type PipelineResourceType `json:"type"` // +listType=atomic Params []ResourceParam `json:"params"` // Secrets to fetch to populate some of resource fields // +optional // +listType=atomic SecretParams []SecretParam `json:"secrets,omitempty"` }
PipelineResourceSpec defines an individual resources used in the pipeline.
func (*PipelineResourceSpec) DeepCopy ¶
func (in *PipelineResourceSpec) DeepCopy() *PipelineResourceSpec
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)
SetDefaults implements api.Defaultable
func (*PipelineResourceSpec) Validate ¶
func (rs *PipelineResourceSpec) Validate(ctx context.Context) *apis.FieldError
Validate validates the PipelineResourceSpec based on its type
type PipelineResourceStatus ¶
type PipelineResourceStatus struct { }
PipelineResourceStatus does not contain anything because PipelineResources on their own do not have a status Deprecated
func (*PipelineResourceStatus) DeepCopy ¶
func (in *PipelineResourceStatus) DeepCopy() *PipelineResourceStatus
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 PipelineResourceType ¶
type PipelineResourceType = string
PipelineResourceType represents the type of endpoint the pipelineResource is, so that the controller will know this pipelineResource shouldx 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" // PipelineResourceTypePullRequest indicates that this source is a SCM Pull Request. PipelineResourceTypePullRequest PipelineResourceType = "pullRequest" // PipelineResourceTypeGCS is the subtype for the GCSResources, which is backed by a GCS blob/directory. PipelineResourceTypeGCS PipelineResourceType = "gcs" )
type ResourceDeclaration ¶
type ResourceDeclaration struct { // Name declares the name by which a resource is referenced in the // definition. Resources may be referenced by name in the definition of a // Task's steps. Name string `json:"name"` // Type is the type of this resource; Type PipelineResourceType `json:"type"` // Description is a user-facing description of the declared resource that may be // used to populate a UI. // +optional Description string `json:"description,omitempty"` // TargetPath is the path in workspace directory where the resource // will be copied. // +optional TargetPath string `json:"targetPath,omitempty"` // Optional declares the resource as optional. // By default optional is set to false which makes a resource required. // optional: true - the resource is considered optional // optional: false - the resource is considered required (equivalent of not specifying it) Optional bool `json:"optional,omitempty"` }
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`).
func (*ResourceDeclaration) DeepCopy ¶
func (in *ResourceDeclaration) DeepCopy() *ResourceDeclaration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDeclaration.
func (*ResourceDeclaration) DeepCopyInto ¶
func (in *ResourceDeclaration) DeepCopyInto(out *ResourceDeclaration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceParam ¶
ResourceParam declares a string value to use for the parameter called Name, and is used in the specific context of PipelineResources.
func (*ResourceParam) DeepCopy ¶
func (in *ResourceParam) DeepCopy() *ResourceParam
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceParam.
func (*ResourceParam) DeepCopyInto ¶
func (in *ResourceParam) DeepCopyInto(out *ResourceParam)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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.