Documentation ¶
Index ¶
- func ApplyContexts(spec *v1beta1.TaskSpec, taskName string, tr *v1beta1.TaskRun) *v1beta1.TaskSpec
- func ApplyCredentialsPath(spec *v1beta1.TaskSpec, path string) *v1beta1.TaskSpec
- func ApplyParameters(ctx context.Context, spec *v1beta1.TaskSpec, tr *v1beta1.TaskRun, ...) *v1beta1.TaskSpec
- func ApplyReplacements(spec *v1beta1.TaskSpec, stringReplacements map[string]string, ...) *v1beta1.TaskSpec
- func ApplyStepExitCodePath(spec *v1beta1.TaskSpec) *v1beta1.TaskSpec
- func ApplyTaskResults(spec *v1beta1.TaskSpec) *v1beta1.TaskSpec
- func ApplyWorkspaces(ctx context.Context, spec *v1beta1.TaskSpec, ...) *v1beta1.TaskSpec
- func GetTaskData(ctx context.Context, taskRun *v1beta1.TaskRun, getTask GetTask) (*resolutionutil.ResolvedObjectMeta, *v1beta1.TaskSpec, error)
- func GetTaskKind(taskrun *v1beta1.TaskRun) v1beta1.TaskKind
- func IsGetTaskErrTransient(err error) bool
- type GetTask
- func GetTaskFunc(ctx context.Context, k8s kubernetes.Interface, tekton clientset.Interface, ...) GetTask
- func GetTaskFuncFromTaskRun(ctx context.Context, k8s kubernetes.Interface, tekton clientset.Interface, ...) GetTask
- func GetVerifiedTaskFunc(ctx context.Context, k8s kubernetes.Interface, tekton clientset.Interface, ...) GetTask
- type GetTaskRun
- type LocalTaskRefResolver
- type ResolvedTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyContexts ¶ added in v0.14.0
ApplyContexts applies the substitution from $(context.(taskRun|task).*) with the specified values. Uses "" as a default if a value is not available.
func ApplyCredentialsPath ¶ added in v0.11.0
ApplyCredentialsPath applies a substitution of the key $(credentials.path) with the path that credentials from annotated secrets are written to.
func ApplyParameters ¶
func ApplyParameters(ctx context.Context, spec *v1beta1.TaskSpec, tr *v1beta1.TaskRun, defaults ...v1beta1.ParamSpec) *v1beta1.TaskSpec
ApplyParameters applies the params from a TaskRun.Input.Parameters to a TaskSpec
func ApplyReplacements ¶
func ApplyReplacements(spec *v1beta1.TaskSpec, stringReplacements map[string]string, arrayReplacements map[string][]string) *v1beta1.TaskSpec
ApplyReplacements replaces placeholders for declared parameters with the specified replacements.
func ApplyStepExitCodePath ¶ added in v0.27.0
ApplyStepExitCodePath replaces the occurrences of exitCode path with the absolute tekton internal path Replace $(steps.<step-name>.exitCode.path) with pipeline.StepPath/<step-name>/exitCode
func ApplyTaskResults ¶ added in v0.11.0
ApplyTaskResults applies the substitution from values in results which are referenced in spec as subitems of the replacementStr.
func ApplyWorkspaces ¶ added in v0.10.0
func ApplyWorkspaces(ctx context.Context, spec *v1beta1.TaskSpec, declarations []v1beta1.WorkspaceDeclaration, bindings []v1beta1.WorkspaceBinding, vols map[string]corev1.Volume) *v1beta1.TaskSpec
ApplyWorkspaces applies the substitution from paths that the workspaces in declarations mounted to, the volumes that bindings are realized with in the task spec and the PersistentVolumeClaim names for the workspaces.
func GetTaskData ¶
func GetTaskData(ctx context.Context, taskRun *v1beta1.TaskRun, getTask GetTask) (*resolutionutil.ResolvedObjectMeta, *v1beta1.TaskSpec, error)
GetTaskData will retrieve the Task metadata and Spec associated with the provided TaskRun. This can come from a reference Task or from the TaskRun's metadata and embedded TaskSpec.
func GetTaskKind ¶ added in v0.25.0
GetTaskKind returns the referenced Task kind (Task, ClusterTask, ...) if the TaskRun is using TaskRef.
func IsGetTaskErrTransient ¶ added in v0.31.0
IsGetTaskErrTransient returns true if an error returned by GetTask is retryable.
Types ¶
type GetTask ¶
GetTask is a function used to retrieve Tasks.
func GetTaskFunc ¶ added in v0.18.0
func GetTaskFunc(ctx context.Context, k8s kubernetes.Interface, tekton clientset.Interface, requester remoteresource.Requester, owner kmeta.OwnerRefable, tr *v1beta1.TaskRef, trName string, namespace, saName string) GetTask
GetTaskFunc is a factory function that will use the given TaskRef as context to return a valid GetTask function. It also requires a kubeclient, tektonclient, namespace, and service account in case it needs to find that task in cluster or authorize against an external repositroy. It will figure out whether it needs to look in the cluster or in a remote image to fetch the reference. It will also return the "kind" of the task being referenced.
func GetTaskFuncFromTaskRun ¶ added in v0.25.0
func GetTaskFuncFromTaskRun(ctx context.Context, k8s kubernetes.Interface, tekton clientset.Interface, requester remoteresource.Requester, taskrun *v1beta1.TaskRun, verificationpolicies []*v1alpha1.VerificationPolicy) GetTask
GetTaskFuncFromTaskRun is a factory function that will use the given TaskRef as context to return a valid GetTask function. It also requires a kubeclient, tektonclient, namespace, and service account in case it needs to find that task in cluster or authorize against an external repositroy. It will figure out whether it needs to look in the cluster or in a remote image to fetch the reference. It will also return the "kind" of the task being referenced.
func GetVerifiedTaskFunc ¶ added in v0.43.0
func GetVerifiedTaskFunc(ctx context.Context, k8s kubernetes.Interface, tekton clientset.Interface, requester remoteresource.Requester, owner kmeta.OwnerRefable, taskref *v1beta1.TaskRef, trName string, namespace, saName string, verificationpolicies []*v1alpha1.VerificationPolicy) GetTask
GetVerifiedTaskFunc is a wrapper of GetTaskFunc and return the function to verify the task if there are matching verification policies
type GetTaskRun ¶
GetTaskRun is a function used to retrieve TaskRuns
type LocalTaskRefResolver ¶ added in v0.12.0
type LocalTaskRefResolver struct { Namespace string Kind v1beta1.TaskKind Tektonclient clientset.Interface }
LocalTaskRefResolver uses the current cluster to resolve a task reference.
func (*LocalTaskRefResolver) GetTask ¶ added in v0.12.0
func (l *LocalTaskRefResolver) GetTask(ctx context.Context, name string) (*v1beta1.Task, *v1beta1.RefSource, error)
GetTask will resolve either a Task or ClusterTask from the local cluster using a versioned Tekton client. It will return an error if it can't find an appropriate Task for any reason.