A Pipeline is a collection of Tasks arranged in a specific order of execution. Pipelines express how outputs of tasks feed into inputs of subsequent tasks.
Resource Definition
Standard Kubernetes metadata.
Defines the desired state of the Pipeline.
PipelineSpec
A user-facing description of the pipeline.
A user-facing name of the pipeline that may be used to populate a UI.
Parameters that must be supplied when running the Pipeline. See Parameter Types for details.
The graph of Tasks that execute when this Pipeline runs. Name of this task within the Pipeline. Used with runAfter to establish execution order.
User-facing name of this task.
Description of this task.
Reference to a Task definition. Mutually exclusive with taskSpec.
Inline Task specification. Mutually exclusive with taskRef.
List of PipelineTask names that should execute before this Task.
Parameters passed to this task.
Conditions that must be true for the task to run. See When Expressions for details. workspaces
[]WorkspacePipelineTaskBinding
Maps workspaces from the pipeline to the task. Show WorkspacePipelineTaskBinding fields
Name of the workspace as declared by the task.
Name of the workspace declared by the pipeline.
Optional subdirectory on the volume.
Number of retries on task failure.
Behavior on task error:
stopAndFail - Stop pipeline execution (default)
continue - Continue executing remaining tasks
Tasks that execute after all pipeline tasks finish, regardless of success or failure.
workspaces
[]PipelineWorkspaceDeclaration
Workspaces expected to be provided by a PipelineRun. Show PipelineWorkspaceDeclaration fields
Description of how the workspace is used.
Whether the workspace is optional.
Values that this pipeline can output. Show PipelineResult fields
Type of the result: string, array, or object
Human-readable description.
Expression to retrieve the value (e.g., $(tasks.taskName.results.resultName))
Example
apiVersion : tekton.dev/v1
kind : Pipeline
metadata :
name : example-pipeline
spec :
description : "An example pipeline"
params :
- name : repo-url
type : string
workspaces :
- name : shared-data
tasks :
- name : fetch-source
taskRef :
name : git-clone
params :
- name : url
value : $(params.repo-url)
workspaces :
- name : output
workspace : shared-data
- name : build
taskRef :
name : build-task
runAfter :
- fetch-source
workspaces :
- name : source
workspace : shared-data
finally :
- name : cleanup
taskRef :
name : cleanup-task