diff --git a/docs/pipeline-api.md b/docs/pipeline-api.md new file mode 100644 index 00000000000..e160a627d99 --- /dev/null +++ b/docs/pipeline-api.md @@ -0,0 +1,8550 @@ +

Packages:

+ +

tekton.dev/v1alpha1

+
+

Package v1alpha1 contains API Schema definitions for the pipeline v1alpha1 API group

+
+Resource Types: + +

ClusterTask +

+
+

ClusterTask is a Task with a cluster scope. ClusterTasks are used to +represent Tasks that should be publicly addressable from any namespace in the +cluster.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
ClusterTask
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskSpec + + +
+(Optional) +

Spec holds the desired state of the Task from the client

+
+
+ + + + + + + + + + + + + +
+TaskSpec
+ + +TaskSpec + + +
+

+(Members of TaskSpec are embedded into this type.) +

+
+inputs
+ + +Inputs + + +
+(Optional) +

Inputs is an optional set of parameters and resources which must be +supplied by the user when a Task is executed by a TaskRun.

+
+outputs
+ + +Outputs + + +
+(Optional) +

Outputs is an optional set of resources and results produced when this +Task is run.

+
+
+

Condition +

+
+

Condition declares a step that is used to gate the execution of a Task in a Pipeline. +A condition execution (ConditionCheck) evaluates to either true or false

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
Condition
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ConditionSpec + + +
+(Optional) +

Spec holds the desired state of the Condition from the client

+
+
+ + + + + + + + + + + + + + + + + +
+check
+ + +Step + + +
+

Check declares container whose exit code determines where a condition is true or false

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the condition that may be +used to populate a UI.

+
+params
+ + +[]ParamSpec + + +
+(Optional) +

Params is an optional set of parameters which must be supplied by the user when a Condition +is evaluated

+
+resources
+ + +[]ResourceDeclaration + + +
+(Optional) +

Resources is a list of the ConditionResources required to run the condition.

+
+
+

Pipeline +

+
+

Pipeline describes a list of Tasks to execute. It expresses how outputs +of tasks feed into inputs of subsequent tasks.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
Pipeline
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +PipelineSpec + + +
+(Optional) +

Spec holds the desired state of the Pipeline from the client

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the pipeline that may be +used to populate a UI.

+
+resources
+ + +[]PipelineDeclaredResource + + +
+

Resources declares the names and types of the resources given to the +Pipeline’s tasks as inputs and outputs.

+
+tasks
+ + +[]PipelineTask + + +
+

Tasks declares the graph of Tasks that execute when this Pipeline is run.

+
+params
+ + +[]ParamSpec + + +
+

Params declares a list of input parameters that must be supplied when +this Pipeline is run.

+
+workspaces
+ + +[]PipelineWorkspaceDeclaration + + +
+(Optional) +

Workspaces declares a set of named workspaces that are expected to be +provided by a PipelineRun.

+
+results
+ + +[]PipelineResult + + +
+(Optional) +

Results are values that this pipeline can output once run

+
+
+status
+ + +PipelineStatus + + +
+(Optional) +

Status is deprecated. +It usually is used to communicate the observed state of the Pipeline from +the controller, but was unused as there is no controller for Pipeline.

+
+

PipelineRun +

+
+

PipelineRun represents a single execution of a Pipeline. PipelineRuns are how +the graph of Tasks declared in a Pipeline are executed; they specify inputs +to Pipelines such as parameter values and capture operational aspects of the +Tasks execution such as service account and tolerations. Creating a +PipelineRun creates TaskRuns for Tasks in the referenced Pipeline.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
PipelineRun
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +PipelineRunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+pipelineRef
+ + +PipelineRef + + +
+(Optional) +
+pipelineSpec
+ + +PipelineSpec + + +
+(Optional) +
+resources
+ + +[]PipelineResourceBinding + + +
+

Resources is a list of bindings specifying which actual instances of +PipelineResources to use for the resources the Pipeline has declared +it needs.

+
+params
+ + +[]Param + + +
+

Params is a list of parameter names and values.

+
+serviceAccountName
+ +string + +
+(Optional) +
+serviceAccountNames
+ + +[]PipelineRunSpecServiceAccountName + + +
+(Optional) +
+status
+ + +PipelineRunSpecStatus + + +
+(Optional) +

Used for cancelling a pipelinerun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the Pipeline times out. Defaults to never. +Refer to Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces holds a set of workspace bindings that must match names +with those declared in the pipeline.

+
+taskRunSpecs
+ + +[]PipelineTaskRunSpec + + +
+(Optional) +

TaskRunSpecs holds a set of task specific specs

+
+
+status
+ + +PipelineRunStatus + + +
+(Optional) +
+

Run +

+
+

Run represents a single execution of a Custom Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
Run
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +RunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ref
+ + +TaskRef + + +
+(Optional) +
+spec
+ + +EmbeddedRunSpec + + +
+(Optional) +

Spec is a specification of a custom task

+
+
+ +
+
+params
+ + +[]Param + + +
+(Optional) +
+status
+ + +RunSpecStatus + + +
+(Optional) +

Used for cancelling a run (and maybe more later on)

+
+retries
+ +int + +
+(Optional) +

Used for propagating retries count to custom tasks

+
+serviceAccountName
+ +string + +
+(Optional) +
+podTemplate
+ + +Template + + +
+(Optional) +

PodTemplate holds pod specific configuration

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the custom-task times out. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+
+status
+ + +RunStatus + + +
+(Optional) +
+

Task +

+
+

Task represents a collection of sequential steps that are run as part of a +Pipeline using a set of inputs and producing a set of outputs. Tasks execute +when TaskRuns are created that provide the input parameters and resources and +output resources the Task requires.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
Task
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskSpec + + +
+(Optional) +

Spec holds the desired state of the Task from the client

+
+
+ + + + + + + + + + + + + +
+TaskSpec
+ + +TaskSpec + + +
+

+(Members of TaskSpec are embedded into this type.) +

+
+inputs
+ + +Inputs + + +
+(Optional) +

Inputs is an optional set of parameters and resources which must be +supplied by the user when a Task is executed by a TaskRun.

+
+outputs
+ + +Outputs + + +
+(Optional) +

Outputs is an optional set of resources and results produced when this +Task is run.

+
+
+

TaskRun +

+
+

TaskRun represents a single execution of a Task. TaskRuns are how the steps +specified in a Task are executed; they specify the parameters and resources +used to run the steps in a Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
TaskRun
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskRunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+serviceAccountName
+ +string + +
+(Optional) +
+taskRef
+ + +TaskRef + + +
+(Optional) +

no more than one of the TaskRef and TaskSpec may be specified.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +
+status
+ + +TaskRunSpecStatus + + +
+(Optional) +

Used for cancelling a taskrun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

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

+
+podTemplate
+ + +Template + + +
+(Optional) +

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+params
+ + +[]Param + + +
+(Optional) +

From v1beta1

+
+resources
+ + +TaskRunResources + + +
+(Optional) +
+inputs
+ + +TaskRunInputs + + +
+(Optional) +

Deprecated

+
+outputs
+ + +TaskRunOutputs + + +
+(Optional) +
+
+status
+ + +TaskRunStatus + + +
+(Optional) +
+

PipelineResource +

+
+

PipelineResource describes a resource that is an input to or output from a +Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1alpha1 + +
+kind
+string +
PipelineResource
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +PipelineResourceSpec + + +
+

Spec holds the desired state of the PipelineResource from the client

+
+
+ + + + + + + + + + + + + + + + + +
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the resource that may be +used to populate a UI.

+
+type
+ +string + +
+
+params
+ + +[]ResourceParam + + +
+
+secrets
+ + +[]SecretParam + + +
+(Optional) +

Secrets to fetch to populate some of resource fields

+
+
+status
+ + +PipelineResourceStatus + + +
+(Optional) +

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.

+
+

ConditionCheck +

+
+

ConditionCheck represents a single evaluation of a Condition step.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskRunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+serviceAccountName
+ +string + +
+(Optional) +
+taskRef
+ + +TaskRef + + +
+(Optional) +

no more than one of the TaskRef and TaskSpec may be specified.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +
+status
+ + +TaskRunSpecStatus + + +
+(Optional) +

Used for cancelling a taskrun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

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

+
+podTemplate
+ + +Template + + +
+(Optional) +

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+params
+ + +[]Param + + +
+(Optional) +

From v1beta1

+
+resources
+ + +TaskRunResources + + +
+(Optional) +
+inputs
+ + +TaskRunInputs + + +
+(Optional) +

Deprecated

+
+outputs
+ + +TaskRunOutputs + + +
+(Optional) +
+
+status
+ + +TaskRunStatus + + +
+(Optional) +
+

ConditionSpec +

+

+(Appears on:Condition) +

+
+

ConditionSpec defines the desired state of the Condition

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+check
+ + +Step + + +
+

Check declares container whose exit code determines where a condition is true or false

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the condition that may be +used to populate a UI.

+
+params
+ + +[]ParamSpec + + +
+(Optional) +

Params is an optional set of parameters which must be supplied by the user when a Condition +is evaluated

+
+resources
+ + +[]ResourceDeclaration + + +
+(Optional) +

Resources is a list of the ConditionResources required to run the condition.

+
+

EmbeddedRunSpec +

+

+(Appears on:RunSpec) +

+
+

EmbeddedRunSpec allows custom task definitions to be embedded

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +PipelineTaskMetadata + + +
+(Optional) +
+spec
+ +k8s.io/apimachinery/pkg/runtime.RawExtension + +
+(Optional) +

Spec is a specification of a custom task

+
+
+ + + + + + + + + +
+-
+ +[]byte + +
+

Raw is the underlying serialization of this object.

+

TODO: Determine how to detect ContentType and ContentEncoding of ‘Raw’ data.

+
+-
+ +k8s.io/apimachinery/pkg/runtime.Object + +
+

Object can hold a representation of this extension - useful for working with versioned +structs.

+
+
+

Inputs +

+

+(Appears on:TaskSpec) +

+
+

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

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+resources
+ + +[]TaskResource + + +
+(Optional) +

Resources is a list of the input resources required to run the task. +Resources are represented in TaskRuns as bindings to instances of +PipelineResources.

+
+params
+ + +[]ParamSpec + + +
+(Optional) +

Params is a list of input parameters required to run the task. Params +must be supplied as inputs in TaskRuns unless they declare a default +value.

+
+

Outputs +

+

+(Appears on:TaskSpec) +

+
+

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.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+results
+ + +[]TestResult + + +
+(Optional) +
+resources
+ + +[]TaskResource + + +
+(Optional) +
+

PipelineObject +

+
+

PipelineObject is implemented by Pipeline and ClusterPipeline

+
+

PipelineResourceInterface +

+
+

PipelineResourceInterface interface to be implemented by different PipelineResource types

+
+

PipelineRunSpec +

+

+(Appears on:PipelineRun) +

+
+

PipelineRunSpec defines the desired state of PipelineRun

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipelineRef
+ + +PipelineRef + + +
+(Optional) +
+pipelineSpec
+ + +PipelineSpec + + +
+(Optional) +
+resources
+ + +[]PipelineResourceBinding + + +
+

Resources is a list of bindings specifying which actual instances of +PipelineResources to use for the resources the Pipeline has declared +it needs.

+
+params
+ + +[]Param + + +
+

Params is a list of parameter names and values.

+
+serviceAccountName
+ +string + +
+(Optional) +
+serviceAccountNames
+ + +[]PipelineRunSpecServiceAccountName + + +
+(Optional) +
+status
+ + +PipelineRunSpecStatus + + +
+(Optional) +

Used for cancelling a pipelinerun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the Pipeline times out. Defaults to never. +Refer to Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces holds a set of workspace bindings that must match names +with those declared in the pipeline.

+
+taskRunSpecs
+ + +[]PipelineTaskRunSpec + + +
+(Optional) +

TaskRunSpecs holds a set of task specific specs

+
+

PipelineSpec +

+

+(Appears on:Pipeline, PipelineRunSpec) +

+
+

PipelineSpec defines the desired state of Pipeline.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the pipeline that may be +used to populate a UI.

+
+resources
+ + +[]PipelineDeclaredResource + + +
+

Resources declares the names and types of the resources given to the +Pipeline’s tasks as inputs and outputs.

+
+tasks
+ + +[]PipelineTask + + +
+

Tasks declares the graph of Tasks that execute when this Pipeline is run.

+
+params
+ + +[]ParamSpec + + +
+

Params declares a list of input parameters that must be supplied when +this Pipeline is run.

+
+workspaces
+ + +[]PipelineWorkspaceDeclaration + + +
+(Optional) +

Workspaces declares a set of named workspaces that are expected to be +provided by a PipelineRun.

+
+results
+ + +[]PipelineResult + + +
+(Optional) +

Results are values that this pipeline can output once run

+
+

PipelineStatus +

+

+(Appears on:Pipeline) +

+
+

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. +Deprecated

+
+

PipelineTask +

+

+(Appears on:PipelineSpec) +

+
+

PipelineTask defines a task in a Pipeline, passing inputs from both +Params and from the output of previous tasks.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of this task within the context of a Pipeline. Name is +used as a coordinate with the from and runAfter fields to establish +the execution order of tasks relative to one another.

+
+taskRef
+ + +TaskRef + + +
+(Optional) +

TaskRef is a reference to a task definition.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +

TaskSpec is specification of a task

+
+conditions
+ + +[]PipelineTaskCondition + + +
+(Optional) +

Conditions is a list of conditions that need to be true for the task to run

+
+retries
+ +int + +
+(Optional) +

Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False

+
+runAfter
+ +[]string + +
+(Optional) +

RunAfter is the list of PipelineTask names that should be executed before +this Task executes. (Used to force a specific ordering in graph execution.)

+
+resources
+ + +PipelineTaskResources + + +
+(Optional) +

Resources declares the resources given to this task as inputs and +outputs.

+
+params
+ + +[]Param + + +
+(Optional) +

Parameters declares parameters passed to this task.

+
+workspaces
+ + +[]WorkspacePipelineTaskBinding + + +
+(Optional) +

Workspaces maps workspaces from the pipeline spec to the workspaces +declared in the Task.

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the TaskRun times out. Defaults to 1 hour. +Specified TaskRun timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+

PipelineTaskRunSpec +

+

+(Appears on:PipelineRunSpec) +

+
+

PipelineTaskRunSpec holds task specific specs

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipelineTaskName
+ +string + +
+
+taskServiceAccountName
+ +string + +
+
+taskPodTemplate
+ + +Template + + +
+
+

RunSpec +

+

+(Appears on:Run) +

+
+

RunSpec defines the desired state of Run

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ref
+ + +TaskRef + + +
+(Optional) +
+spec
+ + +EmbeddedRunSpec + + +
+(Optional) +

Spec is a specification of a custom task

+
+
+ +
+
+params
+ + +[]Param + + +
+(Optional) +
+status
+ + +RunSpecStatus + + +
+(Optional) +

Used for cancelling a run (and maybe more later on)

+
+retries
+ +int + +
+(Optional) +

Used for propagating retries count to custom tasks

+
+serviceAccountName
+ +string + +
+(Optional) +
+podTemplate
+ + +Template + + +
+(Optional) +

PodTemplate holds pod specific configuration

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the custom-task times out. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+

RunSpecStatus +(string alias)

+

+(Appears on:RunSpec) +

+
+

RunSpecStatus defines the taskrun spec status the user can provide

+
+

TaskObject +

+
+

TaskObject is implemented by Task and ClusterTask

+
+

TaskRunInputs +

+

+(Appears on:TaskRunSpec) +

+
+

TaskRunInputs holds the input values that this task was invoked with.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+resources
+ + +[]TaskResourceBinding + + +
+(Optional) +
+params
+ + +[]Param + + +
+(Optional) +
+

TaskRunOutputs +

+

+(Appears on:TaskRunSpec) +

+
+

TaskRunOutputs holds the output values that this task was invoked with.

+
+ + + + + + + + + + + + + +
FieldDescription
+resources
+ + +[]TaskResourceBinding + + +
+(Optional) +
+

TaskRunSpec +

+

+(Appears on:TaskRun, ConditionCheck) +

+
+

TaskRunSpec defines the desired state of TaskRun

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+serviceAccountName
+ +string + +
+(Optional) +
+taskRef
+ + +TaskRef + + +
+(Optional) +

no more than one of the TaskRef and TaskSpec may be specified.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +
+status
+ + +TaskRunSpecStatus + + +
+(Optional) +

Used for cancelling a taskrun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

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

+
+podTemplate
+ + +Template + + +
+(Optional) +

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+params
+ + +[]Param + + +
+(Optional) +

From v1beta1

+
+resources
+ + +TaskRunResources + + +
+(Optional) +
+inputs
+ + +TaskRunInputs + + +
+(Optional) +

Deprecated

+
+outputs
+ + +TaskRunOutputs + + +
+(Optional) +
+

TaskSpec +

+

+(Appears on:ClusterTask, Task, PipelineTask, TaskRunSpec) +

+
+

TaskSpec defines the desired state of Task.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+TaskSpec
+ + +TaskSpec + + +
+

+(Members of TaskSpec are embedded into this type.) +

+
+inputs
+ + +Inputs + + +
+(Optional) +

Inputs is an optional set of parameters and resources which must be +supplied by the user when a Task is executed by a TaskRun.

+
+outputs
+ + +Outputs + + +
+(Optional) +

Outputs is an optional set of resources and results produced when this +Task is run.

+
+

TestResult +

+

+(Appears on:Outputs) +

+
+

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

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name declares the name by which a result is referenced in the Task’s +definition. Results may be referenced by name in the definition of a +Task’s steps.

+
+format
+ +string + +
+

TODO: maybe this is an enum with types like “go test”, “junit”, etc.

+
+path
+ +string + +
+
+

PipelineResourceSpec +

+

+(Appears on:PipelineResource, PipelineResourceBinding) +

+
+

PipelineResourceSpec defines an individual resources used in the pipeline.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the resource that may be +used to populate a UI.

+
+type
+ +string + +
+
+params
+ + +[]ResourceParam + + +
+
+secrets
+ + +[]SecretParam + + +
+(Optional) +

Secrets to fetch to populate some of resource fields

+
+

PipelineResourceStatus +

+

+(Appears on:PipelineResource) +

+
+

PipelineResourceStatus does not contain anything because PipelineResources on their own +do not have a status +Deprecated

+
+

ResourceDeclaration +

+

+(Appears on:ConditionSpec, TaskResource) +

+
+

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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

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.

+
+type
+ +string + +
+

Type is the type of this resource;

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the declared resource that may be +used to populate a UI.

+
+targetPath
+ +string + +
+(Optional) +

TargetPath is the path in workspace directory where the resource +will be copied.

+
+optional
+ +bool + +
+

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)

+
+

ResourceParam +

+

+(Appears on:PipelineResourceSpec) +

+
+

ResourceParam declares a string value to use for the parameter called Name, and is used in +the specific context of PipelineResources.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+value
+ +string + +
+
+

SecretParam +

+

+(Appears on:PipelineResourceSpec) +

+
+

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

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+fieldName
+ +string + +
+
+secretKey
+ +string + +
+
+secretName
+ +string + +
+
+

RunResult +

+

+(Appears on:RunStatusFields) +

+
+

RunResult used to describe the results of a task

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name the given name

+
+value
+ +string + +
+

Value the given value of the result

+
+

RunStatus +

+

+(Appears on:Run, PipelineRunRunStatus, RunStatusFields) +

+
+

RunStatus defines the observed state of Run

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+Status
+ + +knative.dev/pkg/apis/duck/v1.Status + + +
+

+(Members of Status are embedded into this type.) +

+
+RunStatusFields
+ + +RunStatusFields + + +
+

+(Members of RunStatusFields are embedded into this type.) +

+

RunStatusFields inlines the status fields.

+
+

RunStatusFields +

+

+(Appears on:RunStatus) +

+
+

RunStatusFields holds the fields of Run’s status. This is defined +separately and inlined so that other types can readily consume these fields +via duck typing.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+startTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

StartTime is the time the build is actually started.

+
+completionTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

CompletionTime is the time the build completed.

+
+results
+ + +[]RunResult + + +
+(Optional) +

Results reports any output result values to be consumed by later +tasks in a pipeline.

+
+retriesStatus
+ + +[]RunStatus + + +
+(Optional) +

RetriesStatus contains the history of RunStatus, in case of a retry.

+
+extraFields
+ +k8s.io/apimachinery/pkg/runtime.RawExtension + +
+

ExtraFields holds arbitrary fields provided by the custom task +controller.

+
+
+

tekton.dev/v1beta1

+
+

Package v1beta1 contains API Schema definitions for the pipeline v1beta1 API group

+
+Resource Types: + +

ClusterTask +

+
+

ClusterTask is a Task with a cluster scope. ClusterTasks are used to +represent Tasks that should be publicly addressable from any namespace in the +cluster.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1beta1 + +
+kind
+string +
ClusterTask
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskSpec + + +
+(Optional) +

Spec holds the desired state of the Task from the client

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+resources
+ + +TaskResources + + +
+(Optional) +

Resources is a list input and output resource to run the task +Resources are represented in TaskRuns as bindings to instances of +PipelineResources.

+
+params
+ + +[]ParamSpec + + +
+(Optional) +

Params is a list of input parameters required to run the task. Params +must be supplied as inputs in TaskRuns unless they declare a default +value.

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the task that may be +used to populate a UI.

+
+steps
+ + +[]Step + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+stepTemplate
+ + +Kubernetes core/v1.Container + + +
+

StepTemplate can be used as the basis for all step containers within the +Task, so that the steps inherit settings on the base container.

+
+sidecars
+ + +[]Sidecar + + +
+

Sidecars are run alongside the Task’s step containers. They begin before +the steps start and end after the steps complete.

+
+workspaces
+ + +[]WorkspaceDeclaration + + +
+

Workspaces are the volumes that this Task requires.

+
+results
+ + +[]TaskResult + + +
+

Results are values that this Task can output

+
+
+

Pipeline +

+
+

Pipeline describes a list of Tasks to execute. It expresses how outputs +of tasks feed into inputs of subsequent tasks.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1beta1 + +
+kind
+string +
Pipeline
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +PipelineSpec + + +
+(Optional) +

Spec holds the desired state of the Pipeline from the client

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the pipeline that may be +used to populate a UI.

+
+resources
+ + +[]PipelineDeclaredResource + + +
+

Resources declares the names and types of the resources given to the +Pipeline’s tasks as inputs and outputs.

+
+tasks
+ + +[]PipelineTask + + +
+

Tasks declares the graph of Tasks that execute when this Pipeline is run.

+
+params
+ + +[]ParamSpec + + +
+

Params declares a list of input parameters that must be supplied when +this Pipeline is run.

+
+workspaces
+ + +[]PipelineWorkspaceDeclaration + + +
+(Optional) +

Workspaces declares a set of named workspaces that are expected to be +provided by a PipelineRun.

+
+results
+ + +[]PipelineResult + + +
+(Optional) +

Results are values that this pipeline can output once run

+
+finally
+ + +[]PipelineTask + + +
+

Finally declares the list of Tasks that execute just before leaving the Pipeline +i.e. either after all Tasks are finished executing successfully +or after a failure which would result in ending the Pipeline

+
+
+

PipelineRun +

+
+

PipelineRun represents a single execution of a Pipeline. PipelineRuns are how +the graph of Tasks declared in a Pipeline are executed; they specify inputs +to Pipelines such as parameter values and capture operational aspects of the +Tasks execution such as service account and tolerations. Creating a +PipelineRun creates TaskRuns for Tasks in the referenced Pipeline.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1beta1 + +
+kind
+string +
PipelineRun
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +PipelineRunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+pipelineRef
+ + +PipelineRef + + +
+(Optional) +
+pipelineSpec
+ + +PipelineSpec + + +
+(Optional) +
+resources
+ + +[]PipelineResourceBinding + + +
+

Resources is a list of bindings specifying which actual instances of +PipelineResources to use for the resources the Pipeline has declared +it needs.

+
+params
+ + +[]Param + + +
+

Params is a list of parameter names and values.

+
+serviceAccountName
+ +string + +
+(Optional) +
+serviceAccountNames
+ + +[]PipelineRunSpecServiceAccountName + + +
+(Optional) +

Deprecated: use taskRunSpecs.ServiceAccountName instead

+
+status
+ + +PipelineRunSpecStatus + + +
+(Optional) +

Used for cancelling a pipelinerun (and maybe more later on)

+
+timeouts
+ + +TimeoutFields + + +
+(Optional) +

This is an alpha field. You must set the “enable-api-fields” feature flag to “alpha” +for this field to be supported.

+

Time after which the Pipeline times out. +Currently three keys are accepted in the map +pipeline, tasks and finally +with Timeouts.pipeline >= Timeouts.tasks + Timeouts.finally

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the Pipeline times out. Defaults to never. +Refer to Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces holds a set of workspace bindings that must match names +with those declared in the pipeline.

+
+taskRunSpecs
+ + +[]PipelineTaskRunSpec + + +
+(Optional) +

TaskRunSpecs holds a set of runtime specs

+
+
+status
+ + +PipelineRunStatus + + +
+(Optional) +
+

Task +

+
+

Task represents a collection of sequential steps that are run as part of a +Pipeline using a set of inputs and producing a set of outputs. Tasks execute +when TaskRuns are created that provide the input parameters and resources and +output resources the Task requires.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1beta1 + +
+kind
+string +
Task
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskSpec + + +
+(Optional) +

Spec holds the desired state of the Task from the client

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+resources
+ + +TaskResources + + +
+(Optional) +

Resources is a list input and output resource to run the task +Resources are represented in TaskRuns as bindings to instances of +PipelineResources.

+
+params
+ + +[]ParamSpec + + +
+(Optional) +

Params is a list of input parameters required to run the task. Params +must be supplied as inputs in TaskRuns unless they declare a default +value.

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the task that may be +used to populate a UI.

+
+steps
+ + +[]Step + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+stepTemplate
+ + +Kubernetes core/v1.Container + + +
+

StepTemplate can be used as the basis for all step containers within the +Task, so that the steps inherit settings on the base container.

+
+sidecars
+ + +[]Sidecar + + +
+

Sidecars are run alongside the Task’s step containers. They begin before +the steps start and end after the steps complete.

+
+workspaces
+ + +[]WorkspaceDeclaration + + +
+

Workspaces are the volumes that this Task requires.

+
+results
+ + +[]TaskResult + + +
+

Results are values that this Task can output

+
+
+

TaskRun +

+
+

TaskRun represents a single execution of a Task. TaskRuns are how the steps +specified in a Task are executed; they specify the parameters and resources +used to run the steps in a Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +tekton.dev/v1beta1 + +
+kind
+string +
TaskRun
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskRunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+debug
+ + +TaskRunDebug + + +
+(Optional) +
+params
+ + +[]Param + + +
+(Optional) +
+resources
+ + +TaskRunResources + + +
+(Optional) +
+serviceAccountName
+ +string + +
+(Optional) +
+taskRef
+ + +TaskRef + + +
+(Optional) +

no more than one of the TaskRef and TaskSpec may be specified.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +
+status
+ + +TaskRunSpecStatus + + +
+(Optional) +

Used for cancelling a taskrun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the build times out. Defaults to 1 hour. +Specified build timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+
+status
+ + +TaskRunStatus + + +
+(Optional) +
+

ArrayOrString +

+

+(Appears on:Param, ParamSpec) +

+
+

ArrayOrString is a type that can hold a single string or string array. +Used in JSON unmarshalling so that a single JSON field can accept +either an individual string or an array of strings.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +ParamType + + +
+
+stringVal
+ +string + +
+

Represents the stored type of ArrayOrString.

+
+arrayVal
+ +[]string + +
+
+

CloudEventCondition +(string alias)

+

+(Appears on:CloudEventDeliveryState) +

+
+

CloudEventCondition is a string that represents the condition of the event.

+
+ + + + + + + + + + + + + + +
ValueDescription

"Failed"

CloudEventConditionFailed means that there was one or more attempts to +send the event, and none was successful so far.

+

"Sent"

CloudEventConditionSent means that the event was sent successfully

+

"Unknown"

CloudEventConditionUnknown means that the condition for the event to be +triggered was not met yet, or we don’t know the state yet.

+
+

CloudEventDelivery +

+

+(Appears on:TaskRunStatusFields) +

+
+

CloudEventDelivery is the target of a cloud event along with the state of +delivery.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+target
+ +string + +
+

Target points to an addressable

+
+status
+ + +CloudEventDeliveryState + + +
+
+

CloudEventDeliveryState +

+

+(Appears on:CloudEventDelivery) +

+
+

CloudEventDeliveryState reports the state of a cloud event to be sent.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+condition
+ + +CloudEventCondition + + +
+

Current status

+
+sentAt
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

SentAt is the time at which the last attempt to send the event was made

+
+message
+ +string + +
+

Error is the text of error (if any)

+
+retryCount
+ +int32 + +
+

RetryCount is the number of attempts of sending the cloud event

+
+

ConditionCheck +

+
+

ConditionCheck represents a single evaluation of a Condition step.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+(Optional) +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +TaskRunSpec + + +
+(Optional) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+debug
+ + +TaskRunDebug + + +
+(Optional) +
+params
+ + +[]Param + + +
+(Optional) +
+resources
+ + +TaskRunResources + + +
+(Optional) +
+serviceAccountName
+ +string + +
+(Optional) +
+taskRef
+ + +TaskRef + + +
+(Optional) +

no more than one of the TaskRef and TaskSpec may be specified.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +
+status
+ + +TaskRunSpecStatus + + +
+(Optional) +

Used for cancelling a taskrun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the build times out. Defaults to 1 hour. +Specified build timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+
+status
+ + +TaskRunStatus + + +
+(Optional) +
+

ConditionCheckStatus +

+

+(Appears on:PipelineRunConditionCheckStatus) +

+
+

ConditionCheckStatus defines the observed state of ConditionCheck

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+Status
+ + +knative.dev/pkg/apis/duck/v1beta1.Status + + +
+

+(Members of Status are embedded into this type.) +

+
+ConditionCheckStatusFields
+ + +ConditionCheckStatusFields + + +
+

+(Members of ConditionCheckStatusFields are embedded into this type.) +

+

ConditionCheckStatusFields inlines the status fields.

+
+

ConditionCheckStatusFields +

+

+(Appears on:ConditionCheckStatus) +

+
+

ConditionCheckStatusFields holds the fields of ConfigurationCheck’s status. +This is defined separately and inlined so that other types can readily +consume these fields via duck typing.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+podName
+ +string + +
+

PodName is the name of the pod responsible for executing this condition check.

+
+startTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

StartTime is the time the check is actually started.

+
+completionTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

CompletionTime is the time the check pod completed.

+
+check
+ + +Kubernetes core/v1.ContainerState + + +
+(Optional) +

Check describes the state of the check container.

+
+

EmbeddedTask +

+

+(Appears on:PipelineTask) +

+
+

EmbeddedTask is used to define a Task inline within a Pipeline’s PipelineTasks.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+spec
+ +k8s.io/apimachinery/pkg/runtime.RawExtension + +
+(Optional) +

Spec is a specification of a custom task

+
+
+ + + + + + + + + +
+-
+ +[]byte + +
+

Raw is the underlying serialization of this object.

+

TODO: Determine how to detect ContentType and ContentEncoding of ‘Raw’ data.

+
+-
+ +k8s.io/apimachinery/pkg/runtime.Object + +
+

Object can hold a representation of this extension - useful for working with versioned +structs.

+
+
+metadata
+ + +PipelineTaskMetadata + + +
+(Optional) +
+TaskSpec
+ + +TaskSpec + + +
+

+(Members of TaskSpec are embedded into this type.) +

+(Optional) +

TaskSpec is a specification of a task

+
+

InternalTaskModifier +

+
+

InternalTaskModifier implements TaskModifier for resources that are built-in to Tekton Pipelines.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+StepsToPrepend
+ + +[]Step + + +
+
+StepsToAppend
+ + +[]Step + + +
+
+Volumes
+ + +[]Kubernetes core/v1.Volume + + +
+
+

Param +

+

+(Appears on:PipelineRunSpec, PipelineTask, RunSpec, TaskRunInputs, TaskRunSpec, PipelineRunSpec, PipelineTask, PipelineTaskCondition, TaskRunInputs, TaskRunSpec) +

+
+

Param declares an ArrayOrString to use for the parameter called name.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+value
+ + +ArrayOrString + + +
+
+

ParamSpec +

+

+(Appears on:ConditionSpec, Inputs, PipelineSpec, PipelineSpec, TaskSpec) +

+
+

ParamSpec defines arbitrary parameters needed beyond typed inputs (such as +resources). Parameter values are provided by users as inputs on a TaskRun +or PipelineRun.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name declares the name by which a parameter is referenced.

+
+type
+ + +ParamType + + +
+(Optional) +

Type is the user-specified type of the parameter. The possible types +are currently “string” and “array”, and “string” is the default.

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the parameter that may be +used to populate a UI.

+
+default
+ + +ArrayOrString + + +
+(Optional) +

Default is the value a parameter takes if no input value is supplied. If +default is set, a Task may be executed without a supplied value for the +parameter.

+
+

ParamType +(string alias)

+

+(Appears on:ArrayOrString, ParamSpec) +

+
+

ParamType indicates the type of an input parameter; +Used to distinguish between a single string and an array of strings.

+
+ + + + + + + + + + + + +
ValueDescription

"array"

"string"

+

PipelineDeclaredResource +

+

+(Appears on:PipelineSpec, PipelineSpec) +

+
+

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.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

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.

+
+type
+ +string + +
+

Type is the type of the PipelineResource.

+
+optional
+ +bool + +
+

Optional declares the resource as optional. +optional: true - the resource is considered optional +optional: false - the resource is considered required (default/equivalent of not specifying it)

+
+

PipelineObject +

+
+

PipelineObject is implemented by Pipeline and ClusterPipeline

+
+

PipelineRef +

+

+(Appears on:PipelineRunSpec, PipelineRunSpec) +

+
+

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

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names

+
+apiVersion
+ +string + +
+(Optional) +

API version of the referent

+
+bundle
+ +string + +
+(Optional) +

Bundle url reference to a Tekton Bundle.

+
+

PipelineResourceBinding +

+

+(Appears on:PipelineRunSpec, PipelineRunSpec, TaskResourceBinding) +

+
+

PipelineResourceBinding connects a reference to an instance of a PipelineResource +with a PipelineResource dependency that the Pipeline has declared

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the PipelineResource in the Pipeline’s declaration

+
+resourceRef
+ + +PipelineResourceRef + + +
+(Optional) +

ResourceRef is a reference to the instance of the actual PipelineResource +that should be used

+
+resourceSpec
+ + +PipelineResourceSpec + + +
+(Optional) +

ResourceSpec is specification of a resource that should be created and +consumed by the task

+
+

PipelineResourceInterface +

+
+

PipelineResourceInterface interface to be implemented by different PipelineResource types

+
+

PipelineResourceRef +

+

+(Appears on:PipelineResourceBinding, PipelineResourceResult) +

+
+

PipelineResourceRef can be used to refer to a specific instance of a Resource

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names

+
+apiVersion
+ +string + +
+(Optional) +

API version of the referent

+
+

PipelineResourceResult +

+

+(Appears on:TaskRunStatusFields) +

+
+

PipelineResourceResult used to export the image name and digest as json

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+key
+ +string + +
+
+value
+ +string + +
+
+resourceName
+ +string + +
+
+resourceRef
+ + +PipelineResourceRef + + +
+

The field ResourceRef should be deprecated and removed in the next API version. +See https://github.com/tektoncd/pipeline/issues/2694 for more information.

+
+type
+ + +ResultType + + +
+
+

PipelineResult +

+

+(Appears on:PipelineSpec, PipelineSpec) +

+
+

PipelineResult used to describe the results of a pipeline

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name the given name

+
+description
+ +string + +
+(Optional) +

Description is a human-readable description of the result

+
+value
+ +string + +
+

Value the expression used to retrieve the value

+
+

PipelineRunConditionCheckStatus +

+

+(Appears on:PipelineRunTaskRunStatus) +

+
+

PipelineRunConditionCheckStatus returns the condition check status

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+conditionName
+ +string + +
+

ConditionName is the name of the Condition

+
+status
+ + +ConditionCheckStatus + + +
+(Optional) +

Status is the ConditionCheckStatus for the corresponding ConditionCheck

+
+

PipelineRunReason +(string alias)

+
+

PipelineRunReason represents a reason for the pipeline run “Succeeded” condition

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription

"Cancelled"

PipelineRunReasonCancelled is the reason set when the PipelineRun cancelled by the user +This reason may be found with a corev1.ConditionFalse status, if the cancellation was processed successfully +This reason may be found with a corev1.ConditionUnknown status, if the cancellation is being processed or failed

+

"CancelledRunningFinally"

PipelineRunReasonCancelledRunningFinally indicates that pipeline has been gracefully cancelled +and no new Tasks will be scheduled by the controller, but final tasks are now running

+

"Completed"

PipelineRunReasonCompleted is the reason set when the PipelineRun completed successfully with one or more skipped Tasks

+

"Failed"

PipelineRunReasonFailed is the reason set when the PipelineRun completed with a failure

+

"PipelineRunPending"

PipelineRunReasonPending is the reason set when the PipelineRun is in the pending state

+

"Running"

PipelineRunReasonRunning is the reason set when the PipelineRun is running

+

"Started"

PipelineRunReasonStarted is the reason set when the PipelineRun has just started

+

"StoppedRunningFinally"

PipelineRunReasonStoppedRunningFinally indicates that pipeline has been gracefully stopped +and no new Tasks will be scheduled by the controller, but final tasks are now running

+

"PipelineRunStopping"

PipelineRunReasonStopping indicates that no new Tasks will be scheduled by the controller, and the +pipeline will stop once all running tasks complete their work

+

"Succeeded"

PipelineRunReasonSuccessful is the reason set when the PipelineRun completed successfully

+

"PipelineRunTimeout"

PipelineRunReasonTimedOut is the reason set when the PipelineRun has timed out

+
+

PipelineRunResult +

+

+(Appears on:PipelineRunStatusFields) +

+
+

PipelineRunResult used to describe the results of a pipeline

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the result’s name as declared by the Pipeline

+
+value
+ +string + +
+

Value is the result returned from the execution of this PipelineRun

+
+

PipelineRunRunStatus +

+

+(Appears on:PipelineRunStatusFields) +

+
+

PipelineRunRunStatus contains the name of the PipelineTask for this Run and the Run’s Status

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipelineTaskName
+ +string + +
+

PipelineTaskName is the name of the PipelineTask.

+
+status
+ + +RunStatus + + +
+(Optional) +

Status is the RunStatus for the corresponding Run

+
+whenExpressions
+ + +[]WhenExpression + + +
+(Optional) +

WhenExpressions is the list of checks guarding the execution of the PipelineTask

+
+

PipelineRunSpec +

+

+(Appears on:PipelineRun) +

+
+

PipelineRunSpec defines the desired state of PipelineRun

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipelineRef
+ + +PipelineRef + + +
+(Optional) +
+pipelineSpec
+ + +PipelineSpec + + +
+(Optional) +
+resources
+ + +[]PipelineResourceBinding + + +
+

Resources is a list of bindings specifying which actual instances of +PipelineResources to use for the resources the Pipeline has declared +it needs.

+
+params
+ + +[]Param + + +
+

Params is a list of parameter names and values.

+
+serviceAccountName
+ +string + +
+(Optional) +
+serviceAccountNames
+ + +[]PipelineRunSpecServiceAccountName + + +
+(Optional) +

Deprecated: use taskRunSpecs.ServiceAccountName instead

+
+status
+ + +PipelineRunSpecStatus + + +
+(Optional) +

Used for cancelling a pipelinerun (and maybe more later on)

+
+timeouts
+ + +TimeoutFields + + +
+(Optional) +

This is an alpha field. You must set the “enable-api-fields” feature flag to “alpha” +for this field to be supported.

+

Time after which the Pipeline times out. +Currently three keys are accepted in the map +pipeline, tasks and finally +with Timeouts.pipeline >= Timeouts.tasks + Timeouts.finally

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the Pipeline times out. Defaults to never. +Refer to Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces holds a set of workspace bindings that must match names +with those declared in the pipeline.

+
+taskRunSpecs
+ + +[]PipelineTaskRunSpec + + +
+(Optional) +

TaskRunSpecs holds a set of runtime specs

+
+

PipelineRunSpecServiceAccountName +

+

+(Appears on:PipelineRunSpec, PipelineRunSpec) +

+
+

PipelineRunSpecServiceAccountName can be used to configure specific +ServiceAccountName for a concrete Task

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+taskName
+ +string + +
+
+serviceAccountName
+ +string + +
+
+

PipelineRunSpecStatus +(string alias)

+

+(Appears on:PipelineRunSpec, PipelineRunSpec) +

+
+

PipelineRunSpecStatus defines the pipelinerun spec status the user can provide

+
+

PipelineRunStatus +

+

+(Appears on:PipelineRun, PipelineRun) +

+
+

PipelineRunStatus defines the observed state of PipelineRun

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+Status
+ + +knative.dev/pkg/apis/duck/v1beta1.Status + + +
+

+(Members of Status are embedded into this type.) +

+
+PipelineRunStatusFields
+ + +PipelineRunStatusFields + + +
+

+(Members of PipelineRunStatusFields are embedded into this type.) +

+

PipelineRunStatusFields inlines the status fields.

+
+

PipelineRunStatusFields +

+

+(Appears on:PipelineRunStatus) +

+
+

PipelineRunStatusFields holds the fields of PipelineRunStatus’ status. +This is defined separately and inlined so that other types can readily +consume these fields via duck typing.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+startTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

StartTime is the time the PipelineRun is actually started.

+
+completionTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

CompletionTime is the time the PipelineRun completed.

+
+taskRuns
+ + +map[string]*github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus + + +
+(Optional) +

map of PipelineRunTaskRunStatus with the taskRun name as the key

+
+runs
+ + +map[string]*github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunRunStatus + + +
+(Optional) +

map of PipelineRunRunStatus with the run name as the key

+
+pipelineResults
+ + +[]PipelineRunResult + + +
+(Optional) +

PipelineResults are the list of results written out by the pipeline task’s containers

+
+pipelineSpec
+ + +PipelineSpec + + +
+

PipelineRunSpec contains the exact spec used to instantiate the run

+
+skippedTasks
+ + +[]SkippedTask + + +
+(Optional) +

list of tasks that were skipped due to when expressions evaluating to false

+
+

PipelineRunTaskRunStatus +

+

+(Appears on:PipelineRunStatusFields) +

+
+

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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipelineTaskName
+ +string + +
+

PipelineTaskName is the name of the PipelineTask.

+
+status
+ + +TaskRunStatus + + +
+(Optional) +

Status is the TaskRunStatus for the corresponding TaskRun

+
+conditionChecks
+ + +map[string]*github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunConditionCheckStatus + + +
+(Optional) +

ConditionChecks maps the name of a condition check to its Status

+
+whenExpressions
+ + +[]WhenExpression + + +
+(Optional) +

WhenExpressions is the list of checks guarding the execution of the PipelineTask

+
+

PipelineSpec +

+

+(Appears on:Pipeline, PipelineRunSpec, PipelineRunStatusFields) +

+
+

PipelineSpec defines the desired state of Pipeline.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the pipeline that may be +used to populate a UI.

+
+resources
+ + +[]PipelineDeclaredResource + + +
+

Resources declares the names and types of the resources given to the +Pipeline’s tasks as inputs and outputs.

+
+tasks
+ + +[]PipelineTask + + +
+

Tasks declares the graph of Tasks that execute when this Pipeline is run.

+
+params
+ + +[]ParamSpec + + +
+

Params declares a list of input parameters that must be supplied when +this Pipeline is run.

+
+workspaces
+ + +[]PipelineWorkspaceDeclaration + + +
+(Optional) +

Workspaces declares a set of named workspaces that are expected to be +provided by a PipelineRun.

+
+results
+ + +[]PipelineResult + + +
+(Optional) +

Results are values that this pipeline can output once run

+
+finally
+ + +[]PipelineTask + + +
+

Finally declares the list of Tasks that execute just before leaving the Pipeline +i.e. either after all Tasks are finished executing successfully +or after a failure which would result in ending the Pipeline

+
+

PipelineTask +

+

+(Appears on:PipelineSpec) +

+
+

PipelineTask defines a task in a Pipeline, passing inputs from both +Params and from the output of previous tasks.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of this task within the context of a Pipeline. Name is +used as a coordinate with the from and runAfter fields to establish +the execution order of tasks relative to one another.

+
+taskRef
+ + +TaskRef + + +
+(Optional) +

TaskRef is a reference to a task definition.

+
+taskSpec
+ + +EmbeddedTask + + +
+(Optional) +

TaskSpec is a specification of a task

+
+conditions
+ + +[]PipelineTaskCondition + + +
+(Optional) +

Conditions is a list of conditions that need to be true for the task to run +Conditions are deprecated, use WhenExpressions instead

+
+when
+ + +WhenExpressions + + +
+(Optional) +

WhenExpressions is a list of when expressions that need to be true for the task to run

+
+retries
+ +int + +
+(Optional) +

Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False

+
+runAfter
+ +[]string + +
+(Optional) +

RunAfter is the list of PipelineTask names that should be executed before +this Task executes. (Used to force a specific ordering in graph execution.)

+
+resources
+ + +PipelineTaskResources + + +
+(Optional) +

Resources declares the resources given to this task as inputs and +outputs.

+
+params
+ + +[]Param + + +
+(Optional) +

Parameters declares parameters passed to this task.

+
+workspaces
+ + +[]WorkspacePipelineTaskBinding + + +
+(Optional) +

Workspaces maps workspaces from the pipeline spec to the workspaces +declared in the Task.

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the TaskRun times out. Defaults to 1 hour. +Specified TaskRun timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+

PipelineTaskCondition +

+

+(Appears on:PipelineTask, PipelineTask) +

+
+

PipelineTaskCondition allows a PipelineTask to declare a Condition to be evaluated before +the Task is run.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditionRef
+ +string + +
+

ConditionRef is the name of the Condition to use for the conditionCheck

+
+params
+ + +[]Param + + +
+(Optional) +

Params declare parameters passed to this Condition

+
+resources
+ + +[]PipelineTaskInputResource + + +
+

Resources declare the resources provided to this Condition as input

+
+

PipelineTaskInputResource +

+

+(Appears on:PipelineTaskCondition, PipelineTaskResources) +

+
+

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.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the PipelineResource as declared by the Task.

+
+resource
+ +string + +
+

Resource is the name of the DeclaredPipelineResource to use.

+
+from
+ +[]string + +
+(Optional) +

From is the list of PipelineTask names that the resource has to come from. +(Implies an ordering in the execution graph.)

+
+

PipelineTaskMetadata +

+

+(Appears on:EmbeddedRunSpec, EmbeddedTask) +

+
+

PipelineTaskMetadata contains the labels or annotations for an EmbeddedTask

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+labels
+ +map[string]string + +
+(Optional) +
+annotations
+ +map[string]string + +
+(Optional) +
+

PipelineTaskOutputResource +

+

+(Appears on:PipelineTaskResources) +

+
+

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.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the PipelineResource as declared by the Task.

+
+resource
+ +string + +
+

Resource is the name of the DeclaredPipelineResource to use.

+
+

PipelineTaskParam +

+
+

PipelineTaskParam is used to provide arbitrary string parameters to a Task.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+value
+ +string + +
+
+

PipelineTaskResources +

+

+(Appears on:PipelineTask, PipelineTask) +

+
+

PipelineTaskResources allows a Pipeline to declare how its DeclaredPipelineResources +should be provided to a Task as its inputs and outputs.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+inputs
+ + +[]PipelineTaskInputResource + + +
+

Inputs holds the mapping from the PipelineResources declared in +DeclaredPipelineResources to the input PipelineResources required by the Task.

+
+outputs
+ + +[]PipelineTaskOutputResource + + +
+

Outputs holds the mapping from the PipelineResources declared in +DeclaredPipelineResources to the input PipelineResources required by the Task.

+
+

PipelineTaskRun +

+
+

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.

+
+ + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+

PipelineTaskRunSpec +

+

+(Appears on:PipelineRunSpec) +

+
+

PipelineTaskRunSpec can be used to configure specific +specs for a concrete Task

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipelineTaskName
+ +string + +
+
+taskServiceAccountName
+ +string + +
+
+taskPodTemplate
+ + +Template + + +
+
+

PipelineWorkspaceDeclaration +

+

+(Appears on:PipelineSpec, PipelineSpec) +

+
+

WorkspacePipelineDeclaration creates a named slot in a Pipeline that a PipelineRun +is expected to populate with a workspace binding. +Deprecated: use PipelineWorkspaceDeclaration type instead

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of a workspace to be provided by a PipelineRun.

+
+description
+ +string + +
+(Optional) +

Description is a human readable string describing how the workspace will be +used in the Pipeline. It can be useful to include a bit of detail about which +tasks are intended to have access to the data on the workspace.

+
+optional
+ +bool + +
+

Optional marks a Workspace as not being required in PipelineRuns. By default +this field is false and so declared workspaces are required.

+
+

ResultRef +

+
+

ResultRef is a type that represents a reference to a task run result

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+PipelineTask
+ +string + +
+
+Result
+ +string + +
+
+

ResultType +(int alias)

+

+(Appears on:PipelineResourceResult) +

+
+

ResultType used to find out whether a PipelineResourceResult is from a task result or not

+
+ + + + + + + + + + +
ValueDescription

1

TaskRunResultType default task run result value

+
+

Sidecar +

+

+(Appears on:TaskSpec) +

+
+

Sidecar has nearly the same data structure as Step, consisting of a Container and an optional Script, but does not have the ability to timeout.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+Container
+ + +Kubernetes core/v1.Container + + +
+

+(Members of Container are embedded into this type.) +

+
+script
+ +string + +
+(Optional) +

Script is the contents of an executable file to execute.

+

If Script is not empty, the Step cannot have an Command or Args.

+
+workspaces
+ + +[]WorkspaceUsage + + +
+(Optional) +

This is an alpha field. You must set the “enable-api-fields” feature flag to “alpha” +for this field to be supported.

+

Workspaces is a list of workspaces from the Task that this Sidecar wants +exclusive access to. Adding a workspace to this list means that any +other Step or Sidecar that does not also request this Workspace will +not have access to it.

+
+

SidecarState +

+

+(Appears on:TaskRunStatusFields) +

+
+

SidecarState reports the results of running a sidecar in a Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ContainerState
+ + +Kubernetes core/v1.ContainerState + + +
+

+(Members of ContainerState are embedded into this type.) +

+
+name
+ +string + +
+
+container
+ +string + +
+
+imageID
+ +string + +
+
+

SkippedTask +

+

+(Appears on:PipelineRunStatusFields) +

+
+

SkippedTask is used to describe the Tasks that were skipped due to their When Expressions +evaluating to False. This is a struct because we are looking into including more details +about the When Expressions that caused this Task to be skipped.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the Pipeline Task name

+
+whenExpressions
+ + +[]WhenExpression + + +
+(Optional) +

WhenExpressions is the list of checks guarding the execution of the PipelineTask

+
+

Step +

+

+(Appears on:ConditionSpec, InternalTaskModifier, TaskSpec) +

+
+

Step embeds the Container type, which allows it to include fields not +provided by Container.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+Container
+ + +Kubernetes core/v1.Container + + +
+

+(Members of Container are embedded into this type.) +

+
+script
+ +string + +
+(Optional) +

Script is the contents of an executable file to execute.

+

If Script is not empty, the Step cannot have an Command and the Args will be passed to the Script.

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Timeout is the time after which the step times out. Defaults to never. +Refer to Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+workspaces
+ + +[]WorkspaceUsage + + +
+(Optional) +

This is an alpha field. You must set the “enable-api-fields” feature flag to “alpha” +for this field to be supported.

+

Workspaces is a list of workspaces from the Task that this Step wants +exclusive access to. Adding a workspace to this list means that any +other Step or Sidecar that does not also request this Workspace will +not have access to it.

+
+onError
+ +string + +
+

OnError defines the exiting behavior of a container on error +can be set to [ continue | stopAndFail ] +stopAndFail indicates exit the taskRun if the container exits with non-zero exit code +continue indicates continue executing the rest of the steps irrespective of the container exit code

+
+

StepState +

+

+(Appears on:TaskRunStatusFields) +

+
+

StepState reports the results of running a step in a Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ContainerState
+ + +Kubernetes core/v1.ContainerState + + +
+

+(Members of ContainerState are embedded into this type.) +

+
+name
+ +string + +
+
+container
+ +string + +
+
+imageID
+ +string + +
+
+

TaskKind +(string alias)

+

+(Appears on:TaskRef) +

+
+

TaskKind defines the type of Task used by the pipeline.

+
+ + + + + + + + + + + + +
ValueDescription

"ClusterTask"

ClusterTaskKind indicates that task type has a cluster scope.

+

"Task"

NamespacedTaskKind indicates that the task type has a namespaced scope.

+
+

TaskModifier +

+
+

TaskModifier is an interface to be implemented by different PipelineResources

+
+

TaskObject +

+
+

TaskObject is implemented by Task and ClusterTask

+
+

TaskRef +

+

+(Appears on:PipelineTask, RunSpec, TaskRunSpec, PipelineTask, TaskRunSpec) +

+
+

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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names

+
+kind
+ + +TaskKind + + +
+

TaskKind indicates the kind of the task, namespaced or cluster scoped.

+
+apiVersion
+ +string + +
+(Optional) +

API version of the referent

+
+bundle
+ +string + +
+(Optional) +

Bundle url reference to a Tekton Bundle.

+
+

TaskResource +

+

+(Appears on:Inputs, Outputs, TaskResources) +

+
+

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

+
+ + + + + + + + + + + + + +
FieldDescription
+ResourceDeclaration
+ + +ResourceDeclaration + + +
+

+(Members of ResourceDeclaration are embedded into this type.) +

+
+

TaskResourceBinding +

+

+(Appears on:TaskRunInputs, TaskRunOutputs, TaskRunInputs, TaskRunOutputs, TaskRunResources) +

+
+

TaskResourceBinding points to the PipelineResource that +will be used for the Task input or output called Name.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+PipelineResourceBinding
+ + +PipelineResourceBinding + + +
+

+(Members of PipelineResourceBinding are embedded into this type.) +

+
+paths
+ +[]string + +
+(Optional) +

Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. +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).

+
+

TaskResources +

+

+(Appears on:TaskSpec) +

+
+

TaskResources allows a Pipeline to declare how its DeclaredPipelineResources +should be provided to a Task as its inputs and outputs.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+inputs
+ + +[]TaskResource + + +
+

Inputs holds the mapping from the PipelineResources declared in +DeclaredPipelineResources to the input PipelineResources required by the Task.

+
+outputs
+ + +[]TaskResource + + +
+

Outputs holds the mapping from the PipelineResources declared in +DeclaredPipelineResources to the input PipelineResources required by the Task.

+
+

TaskResult +

+

+(Appears on:TaskSpec) +

+
+

TaskResult used to describe the results of a task

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name the given name

+
+description
+ +string + +
+(Optional) +

Description is a human-readable description of the result

+
+

TaskRunDebug +

+

+(Appears on:TaskRunSpec) +

+
+

TaskRunDebug defines the breakpoint config for a particular TaskRun

+
+ + + + + + + + + + + + + +
FieldDescription
+breakpoint
+ +[]string + +
+(Optional) +
+

TaskRunInputs +

+
+

TaskRunInputs holds the input values that this task was invoked with.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+resources
+ + +[]TaskResourceBinding + + +
+(Optional) +
+params
+ + +[]Param + + +
+(Optional) +
+

TaskRunOutputs +

+
+

TaskRunOutputs holds the output values that this task was invoked with.

+
+ + + + + + + + + + + + + +
FieldDescription
+resources
+ + +[]TaskResourceBinding + + +
+(Optional) +
+

TaskRunReason +(string alias)

+
+

TaskRunReason is an enum used to store all TaskRun reason for +the Succeeded condition that are controlled by the TaskRun itself. Failure +reasons that emerge from underlying resources are not included here

+
+ + + + + + + + + + + + + + + + + + + + +
ValueDescription

"TaskRunCancelled"

TaskRunReasonCancelled is the reason set when the Taskrun is cancelled by the user

+

"Failed"

TaskRunReasonFailed is the reason set when the TaskRun completed with a failure

+

"Running"

TaskRunReasonRunning is the reason set when the TaskRun is running

+

"Started"

TaskRunReasonStarted is the reason set when the TaskRun has just started

+

"Succeeded"

TaskRunReasonSuccessful is the reason set when the TaskRun completed successfully

+

"TaskRunTimeout"

TaskRunReasonTimedOut is the reason set when the Taskrun has timed out

+
+

TaskRunResources +

+

+(Appears on:TaskRunSpec, TaskRunSpec) +

+
+

TaskRunResources allows a TaskRun to declare inputs and outputs TaskResourceBinding

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+inputs
+ + +[]TaskResourceBinding + + +
+

Inputs holds the inputs resources this task was invoked with

+
+outputs
+ + +[]TaskResourceBinding + + +
+

Outputs holds the inputs resources this task was invoked with

+
+

TaskRunResult +

+

+(Appears on:TaskRunStatusFields) +

+
+

TaskRunResult used to describe the results of a task

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name the given name

+
+value
+ +string + +
+

Value the given value of the result

+
+

TaskRunSpec +

+

+(Appears on:TaskRun, ConditionCheck) +

+
+

TaskRunSpec defines the desired state of TaskRun

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+debug
+ + +TaskRunDebug + + +
+(Optional) +
+params
+ + +[]Param + + +
+(Optional) +
+resources
+ + +TaskRunResources + + +
+(Optional) +
+serviceAccountName
+ +string + +
+(Optional) +
+taskRef
+ + +TaskRef + + +
+(Optional) +

no more than one of the TaskRef and TaskSpec may be specified.

+
+taskSpec
+ + +TaskSpec + + +
+(Optional) +
+status
+ + +TaskRunSpecStatus + + +
+(Optional) +

Used for cancelling a taskrun (and maybe more later on)

+
+timeout
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

Time after which the build times out. Defaults to 1 hour. +Specified build timeout should be less than 24h. +Refer Go’s ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

+
+podTemplate
+ + +Template + + +
+

PodTemplate holds pod specific configuration

+
+workspaces
+ + +[]WorkspaceBinding + + +
+(Optional) +

Workspaces is a list of WorkspaceBindings from volumes to workspaces.

+
+

TaskRunSpecStatus +(string alias)

+

+(Appears on:TaskRunSpec, TaskRunSpec) +

+
+

TaskRunSpecStatus defines the taskrun spec status the user can provide

+
+

TaskRunStatus +

+

+(Appears on:TaskRun, TaskRun, ConditionCheck, ConditionCheck, PipelineRunTaskRunStatus, TaskRunStatusFields) +

+
+

TaskRunStatus defines the observed state of TaskRun

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+Status
+ + +knative.dev/pkg/apis/duck/v1beta1.Status + + +
+

+(Members of Status are embedded into this type.) +

+
+TaskRunStatusFields
+ + +TaskRunStatusFields + + +
+

+(Members of TaskRunStatusFields are embedded into this type.) +

+

TaskRunStatusFields inlines the status fields.

+
+

TaskRunStatusFields +

+

+(Appears on:TaskRunStatus) +

+
+

TaskRunStatusFields holds the fields of TaskRun’s status. This is defined +separately and inlined so that other types can readily consume these fields +via duck typing.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+podName
+ +string + +
+

PodName is the name of the pod responsible for executing this task’s steps.

+
+startTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

StartTime is the time the build is actually started.

+
+completionTime
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

CompletionTime is the time the build completed.

+
+steps
+ + +[]StepState + + +
+(Optional) +

Steps describes the state of each build step container.

+
+cloudEvents
+ + +[]CloudEventDelivery + + +
+(Optional) +

CloudEvents describe the state of each cloud event requested via a +CloudEventResource.

+
+retriesStatus
+ + +[]TaskRunStatus + + +
+(Optional) +

RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. +All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant.

+
+resourcesResult
+ + +[]PipelineResourceResult + + +
+(Optional) +

Results from Resources built during the taskRun. currently includes +the digest of build container images

+
+taskResults
+ + +[]TaskRunResult + + +
+(Optional) +

TaskRunResults are the list of results written out by the task’s containers

+
+sidecars
+ + +[]SidecarState + + +
+

The list has one entry per sidecar in the manifest. Each entry is +represents the imageid of the corresponding sidecar.

+
+taskSpec
+ + +TaskSpec + + +
+

TaskSpec contains the Spec from the dereferenced Task definition used to instantiate this TaskRun.

+
+

TaskSpec +

+

+(Appears on:ClusterTask, Task, TaskSpec, EmbeddedTask, TaskRunSpec, TaskRunStatusFields) +

+
+

TaskSpec defines the desired state of Task.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+resources
+ + +TaskResources + + +
+(Optional) +

Resources is a list input and output resource to run the task +Resources are represented in TaskRuns as bindings to instances of +PipelineResources.

+
+params
+ + +[]ParamSpec + + +
+(Optional) +

Params is a list of input parameters required to run the task. Params +must be supplied as inputs in TaskRuns unless they declare a default +value.

+
+description
+ +string + +
+(Optional) +

Description is a user-facing description of the task that may be +used to populate a UI.

+
+steps
+ + +[]Step + + +
+

Steps are the steps of the build; each step is run sequentially with the +source mounted into /workspace.

+
+volumes
+ + +[]Kubernetes core/v1.Volume + + +
+

Volumes is a collection of volumes that are available to mount into the +steps of the build.

+
+stepTemplate
+ + +Kubernetes core/v1.Container + + +
+

StepTemplate can be used as the basis for all step containers within the +Task, so that the steps inherit settings on the base container.

+
+sidecars
+ + +[]Sidecar + + +
+

Sidecars are run alongside the Task’s step containers. They begin before +the steps start and end after the steps complete.

+
+workspaces
+ + +[]WorkspaceDeclaration + + +
+

Workspaces are the volumes that this Task requires.

+
+results
+ + +[]TaskResult + + +
+

Results are values that this Task can output

+
+

TimeoutFields +

+

+(Appears on:PipelineRunSpec) +

+
+

TimeoutFields allows granular specification of pipeline, task, and finally timeouts

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+pipeline
+ + +Kubernetes meta/v1.Duration + + +
+

Pipeline sets the maximum allowed duration for execution of the entire pipeline. The sum of individual timeouts for tasks and finally must not exceed this value.

+
+tasks
+ + +Kubernetes meta/v1.Duration + + +
+

Tasks sets the maximum allowed duration of this pipeline’s tasks

+
+finally
+ + +Kubernetes meta/v1.Duration + + +
+

Finally sets the maximum allowed duration of this pipeline’s finally

+
+

WhenExpression +

+

+(Appears on:PipelineRunRunStatus, PipelineRunTaskRunStatus, SkippedTask) +

+
+

WhenExpression allows a PipelineTask to declare expressions to be evaluated before the Task is run +to determine whether the Task should be executed or skipped

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+input
+ +string + +
+

Input is the string for guard checking which can be a static input or an output from a parent Task

+
+operator
+ +k8s.io/apimachinery/pkg/selection.Operator + +
+

Operator that represents an Input’s relationship to the values

+
+values
+ +[]string + +
+

Values is an array of strings, which is compared against the input, for guard checking +It must be non-empty

+
+

WhenExpressions +([]github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression alias)

+

+(Appears on:PipelineTask) +

+
+

WhenExpressions are used to specify whether a Task should be executed or skipped +All of them need to evaluate to True for a guarded Task to be executed.

+
+

WorkspaceBinding +

+

+(Appears on:PipelineRunSpec, RunSpec, TaskRunSpec, PipelineRunSpec, TaskRunSpec) +

+
+

WorkspaceBinding maps a Task’s declared workspace to a Volume.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the workspace populated by the volume.

+
+subPath
+ +string + +
+(Optional) +

SubPath is optionally a directory on the volume which should be used +for this binding (i.e. the volume will be mounted at this sub directory).

+
+volumeClaimTemplate
+ + +Kubernetes core/v1.PersistentVolumeClaim + + +
+(Optional) +

VolumeClaimTemplate is a template for a claim that will be created in the same namespace. +The PipelineRun controller is responsible for creating a unique claim for each instance of PipelineRun.

+
+persistentVolumeClaim
+ + +Kubernetes core/v1.PersistentVolumeClaimVolumeSource + + +
+(Optional) +

PersistentVolumeClaimVolumeSource represents a reference to a +PersistentVolumeClaim in the same namespace. Either this OR EmptyDir can be used.

+
+emptyDir
+ + +Kubernetes core/v1.EmptyDirVolumeSource + + +
+(Optional) +

EmptyDir represents a temporary directory that shares a Task’s lifetime. +More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +Either this OR PersistentVolumeClaim can be used.

+
+configMap
+ + +Kubernetes core/v1.ConfigMapVolumeSource + + +
+(Optional) +

ConfigMap represents a configMap that should populate this workspace.

+
+secret
+ + +Kubernetes core/v1.SecretVolumeSource + + +
+(Optional) +

Secret represents a secret that should populate this workspace.

+
+

WorkspaceDeclaration +

+

+(Appears on:TaskSpec) +

+
+

WorkspaceDeclaration is a declaration of a volume that a Task requires.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name by which you can bind the volume at runtime.

+
+description
+ +string + +
+(Optional) +

Description is an optional human readable description of this volume.

+
+mountPath
+ +string + +
+(Optional) +

MountPath overrides the directory that the volume will be made available at.

+
+readOnly
+ +bool + +
+

ReadOnly dictates whether a mounted volume is writable. By default this +field is false and so mounted volumes are writable.

+
+optional
+ +bool + +
+

Optional marks a Workspace as not being required in TaskRuns. By default +this field is false and so declared workspaces are required.

+
+

WorkspacePipelineTaskBinding +

+

+(Appears on:PipelineTask, PipelineTask) +

+
+

WorkspacePipelineTaskBinding describes how a workspace passed into the pipeline should be +mapped to a task’s declared workspace.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the workspace as declared by the task

+
+workspace
+ +string + +
+

Workspace is the name of the workspace declared by the pipeline

+
+subPath
+ +string + +
+(Optional) +

SubPath is optionally a directory on the volume which should be used +for this binding (i.e. the volume will be mounted at this sub directory).

+
+

WorkspaceUsage +

+

+(Appears on:Sidecar, Step) +

+
+

WorkspaceUsage is used by a Step or Sidecar to declare that it wants isolated access +to a Workspace defined in a Task.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the workspace this Step or Sidecar wants access to.

+
+mountPath
+ +string + +
+

MountPath is the path that the workspace should be mounted to inside the Step or Sidecar, +overriding any MountPath specified in the Task’s WorkspaceDeclaration.

+
+
+

+Generated with gen-crd-api-reference-docs +. +

diff --git a/hack/reference-docs-gen-config.json b/hack/reference-docs-gen-config.json new file mode 100644 index 00000000000..1cf8db3503c --- /dev/null +++ b/hack/reference-docs-gen-config.json @@ -0,0 +1,42 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$", + "docsURLTemplate": "https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration" + }, + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + }, + { + "typeMatchPrefix": "^knative\\.dev/pkg/apis/duck", + "docsURLTemplate": "https://pkg.go.dev/knative.dev/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^knative\\.dev/pkg/apis\\.URL$", + "docsURLTemplate": "https://pkg.go.dev/knative.dev/pkg/apis#URL" + }, + { + "typeMatchPrefix": "^knative\\.dev/networking/pkg/apis/networking", + "docsURLTemplate": "https://pkg.go.dev/knative.dev/networking/pkg/apis/networking#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^time\\.Duration$", + "docsURLTemplate": "https://golang.org/pkg/time/#Duration" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false, + "gitCommitDisabled": true +} + diff --git a/hack/reference-docs-template/members.tpl b/hack/reference-docs-template/members.tpl new file mode 100644 index 00000000000..a529c671647 --- /dev/null +++ b/hack/reference-docs-template/members.tpl @@ -0,0 +1,48 @@ +{{ define "members" }} + +{{ range .Members }} +{{ if not (hiddenMember .)}} + + + {{ fieldName . }}
+ + {{ if linkForType .Type }} + + {{ typeDisplayName .Type }} + + {{ else }} + {{ typeDisplayName .Type }} + {{ end }} + + + + {{ if fieldEmbedded . }} +

+ (Members of {{ fieldName . }} are embedded into this type.) +

+ {{ end}} + + {{ if isOptionalMember .}} + (Optional) + {{ end }} + + {{ safe (renderComments .CommentLines) }} + + {{ if and (eq (.Type.Name.Name) "ObjectMeta") }} + Refer to the Kubernetes API documentation for the fields of the + metadata field. + {{ end }} + + {{ if or (eq (fieldName .) "spec") }} +
+
+ + {{ template "members" .Type }} +
+ {{ end }} + + +{{ end }} +{{ end }} + +{{ end }} diff --git a/hack/reference-docs-template/pkg.tpl b/hack/reference-docs-template/pkg.tpl new file mode 100644 index 00000000000..842ec93d493 --- /dev/null +++ b/hack/reference-docs-template/pkg.tpl @@ -0,0 +1,49 @@ +{{ define "packages" }} + +{{ with .packages}} +

Packages:

+ +{{ end}} + +{{ range .packages }} +

+ {{- packageDisplayName . -}} +

+ + {{ with (index .GoPackages 0 )}} + {{ with .DocComments }} +
+ {{ safe (renderComments .) }} +
+ {{ end }} + {{ end }} + + Resource Types: + + + {{ range (visibleTypes (sortedTypes .Types))}} + {{ template "type" . }} + {{ end }} +
+{{ end }} + +

+ Generated with gen-crd-api-reference-docs + {{ with .gitCommit }} on git commit {{ . }}{{end}}. +

+ +{{ end }} diff --git a/hack/reference-docs-template/placeholder.go b/hack/reference-docs-template/placeholder.go new file mode 100644 index 00000000000..cc8f1453aca --- /dev/null +++ b/hack/reference-docs-template/placeholder.go @@ -0,0 +1,2 @@ +// Placeholder file to make Go vendor this directory properly. +package template diff --git a/hack/reference-docs-template/type.tpl b/hack/reference-docs-template/type.tpl new file mode 100644 index 00000000000..8f0d66b8bab --- /dev/null +++ b/hack/reference-docs-template/type.tpl @@ -0,0 +1,81 @@ +{{ define "type" }} + +

+ {{- .Name.Name }} + {{ if eq .Kind "Alias" }}({{.Underlying}} alias){{ end -}} +

+{{ with (typeReferences .) }} +

+ (Appears on: + {{- $prev := "" -}} + {{- range . -}} + {{- if $prev -}}, {{ end -}} + {{- $prev = . -}} + {{ typeDisplayName . }} + {{- end -}} + ) +

+{{ end }} + +
+ {{ safe (renderComments .CommentLines) }} +
+ +{{ with (constantsOfType .) }} + + + + + + + + + {{- range . -}} + + {{- /* + renderComments implicitly creates a

element, so we + add one to the display name as well to make the contents + of the two cells align evenly. + */ -}} +

+ + + {{- end -}} + +
ValueDescription

{{ typeDisplayName . }}

{{ safe (renderComments .CommentLines) }}
+{{ end }} + +{{ if .Members }} + + + + + + + + + {{ if isExportedType . }} + + + + + + + + + {{ end }} + {{ template "members" .}} + +
FieldDescription
+ apiVersion
+ string
+ + {{apiGroup .}} + +
+ kind
+ string +
{{.Name.Name}}
+{{ end }} + +{{ end }} diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 7ccfaa0279f..5d46ad6401f 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -82,3 +82,6 @@ ${REPO_ROOT_DIR}/hack/update-deps.sh # Make sure the OpenAPI specification and Swagger file are up-to-date ${REPO_ROOT_DIR}/hack/update-openapigen.sh + +# Make sure the generated API reference docs are up-to-date +${REPO_ROOT_DIR}/hack/update-reference-docs.sh diff --git a/hack/update-reference-docs.sh b/hack/update-reference-docs.sh new file mode 100755 index 00000000000..00d8b055fb5 --- /dev/null +++ b/hack/update-reference-docs.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset + +PREFIX=${GOBIN:-${GOPATH}/bin} + +( + # To support running this script from anywhere, we have to first cd into this directory + # so we can install the tools. + cd $(dirname "${0}") +# TODO(abayer): Switch to github.com/ahmetb/gen-crd-api-reference-docs when https://github.com/ahmetb/gen-crd-api-reference-docs/pull/43 is merged + go install github.com/abayer/gen-crd-api-reference-docs +) + +echo "Generating API reference docs ..." +${PREFIX}/gen-crd-api-reference-docs \ + -config "./hack/reference-docs-gen-config.json" \ + -api-dir "github.com/tektoncd/pipeline/pkg/apis" \ + -template-dir "./hack/reference-docs-template" \ + -out-file "./docs/pipeline-api.md" diff --git a/pkg/apis/doc.go b/pkg/apis/doc.go new file mode 100644 index 00000000000..45a32127ac8 --- /dev/null +++ b/pkg/apis/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2019 The Tekton Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package apis contains API Schema definitions for the various API groups +package apis diff --git a/pkg/apis/pipeline/pod/doc.go b/pkg/apis/pipeline/pod/doc.go index 2187544efad..9e7c8c3352c 100644 --- a/pkg/apis/pipeline/pod/doc.go +++ b/pkg/apis/pipeline/pod/doc.go @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:openapi-gen=true - // Package pod contains non-versioned pod configuration +// +k8s:openapi-gen=true +// +gencrdrefdocs:unversionedTypes +// +groupName=tekton.dev package pod diff --git a/pkg/apis/run/v1alpha1/doc.go b/pkg/apis/run/v1alpha1/doc.go new file mode 100644 index 00000000000..7fe3a2e1645 --- /dev/null +++ b/pkg/apis/run/v1alpha1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2019 The Tekton Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1alpha1 contains API Schema definitions for the run v1alpha1 API group +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/tektoncd/pipeline/pkg/apis/run +// +k8s:defaulter-gen=TypeMeta +// +groupName=tekton.dev +package v1alpha1