Skip to main content
A PipelineRun represents a single execution of a Pipeline. PipelineRuns instantiate Pipelines and create TaskRuns for each task in the pipeline.

Resource Definition

apiVersion
string
required
tekton.dev/v1
kind
string
required
PipelineRun
metadata
ObjectMeta
required
Standard Kubernetes metadata.
spec
PipelineRunSpec
required
Defines the desired state of the PipelineRun.
status
PipelineRunStatus
Defines the observed state of the PipelineRun.

PipelineRunSpec

pipelineRef
PipelineRef
Reference to the Pipeline to execute. Mutually exclusive with pipelineSpec.
pipelineSpec
PipelineSpec
Inline Pipeline specification. Mutually exclusive with pipelineRef.Can be disabled with the disable-inline-spec feature flag.
params
[]Param
Parameters to pass to the Pipeline.See Parameter Types for details.
workspaces
[]WorkspaceBinding
Workspace bindings for the Pipeline.See Workspace Types for details.
timeouts
TimeoutFields
Timeout configuration for the PipelineRun.Constraint: pipelinetasks + finally
status
string
Control the execution state of the PipelineRun.Values:
  • Cancelled - Cancel immediately
  • CancelledRunFinally - Cancel but run finally tasks
  • StoppedRunFinally - Stop gracefully and run finally tasks
  • PipelineRunPending - Hold execution until set to empty string
taskRunTemplate
PipelineTaskRunTemplate
Template configuration applied to all TaskRuns created by this PipelineRun.
taskRunSpecs
[]PipelineTaskRunSpec
Specifications for individual tasks in the pipeline.

PipelineRunStatus

conditions
[]Condition
Conditions describing the current state.
startTime
Time
When the PipelineRun started.
completionTime
Time
When the PipelineRun completed.
finallyStartTime
Time
When finally tasks began executing.
pipelineSpec
PipelineSpec
The resolved Pipeline specification that was executed.
childReferences
[]ChildStatusReference
References to TaskRuns and Runs created by this PipelineRun.
results
[]PipelineRunResult
Results produced by the Pipeline.
skippedTasks
[]SkippedTask
Tasks that were skipped.

Example

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: example-pipelinerun
spec:
  pipelineRef:
    name: example-pipeline
  params:
    - name: repo-url
      value: https://github.com/example/repo
  workspaces:
    - name: shared-data
      volumeClaimTemplate:
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 1Gi
  timeouts:
    pipeline: 1h
    tasks: 50m
    finally: 10m

Build docs developers (and LLMs) love