Pipeline [tekton.dev/v1]

描述
Pipeline describes a list of Tasks to execute. It expresses how outputs of tasks feed into inputs of subsequent tasks.
类型
object

规格

属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

specobject

Spec holds the desired state of the Pipeline from the client

.spec

描述
Spec holds the desired state of the Pipeline from the client
类型
object
属性类型描述
descriptionstring

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

displayNamestring

DisplayName is a user-facing name of the pipeline that may be used to populate a UI.

finallyarray

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

paramsarray

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

resultsarray

Results are values that this pipeline can output once run

tasksarray

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

workspacesarray

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

.spec.finally

描述
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
类型
array

.spec.finally[]

描述
PipelineTask defines a task in a Pipeline, passing inputs from both Params and from the output of previous tasks.
类型
object
属性类型描述
descriptionstring

Description is the description of this task within the context of a Pipeline. This description may be used to populate a UI.

displayNamestring

DisplayName is the display name of this task within the context of a Pipeline. This display name may be used to populate a UI.

matrixobject

Matrix declares parameters used to fan out this task.

namestring

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.

onErrorstring

OnError defines the exiting behavior of a PipelineRun on error can be set to [ continue | stopAndFail ]

paramsarray

Parameters declares parameters passed to this task.

pipelineRefobject

PipelineRef is a reference to a pipeline definition Note: PipelineRef is in preview mode and not yet supported

pipelineSpec

PipelineSpec is a specification of a pipeline Note: PipelineSpec is in preview mode and not yet supported Specifying PipelineSpec can be disabled by setting disable-inline-spec feature flag. See Pipeline.spec (API version: tekton.dev/v1)

retriesinteger

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

runAfterarray

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

taskRefobject

TaskRef is a reference to a task definition.

taskSpec

TaskSpec is a specification of a task Specifying TaskSpec can be disabled by setting disable-inline-spec feature flag. See Task.spec (API version: tekton.dev/v1)

timeoutstring

Time after which the TaskRun times out. Defaults to 1 hour. Refer Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

whenarray

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

workspacesarray

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

.spec.finally[].matrix

描述
Matrix declares parameters used to fan out this task.
类型
object
属性类型描述
includearray

Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.

paramsarray

Params is a list of parameters used to fan out the pipelineTask Params takes only Parameters of type "array" Each array element is supplied to the PipelineTask by substituting params of type "string" in the underlying Task. The names of the params in the Matrix must match the names of the params in the underlying Task that they will be substituting.

.spec.finally[].matrix.include

描述
Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
类型
array

.spec.finally[].matrix.include[]

描述
IncludeParams allows passing in a specific combinations of Parameters into the Matrix.
类型
object
属性类型描述
namestring

Name the specified combination

paramsarray

Params takes only Parameters of type "string" The names of the params must match the names of the params in the underlying Task

.spec.finally[].matrix.include[].params

描述
Params takes only `Parameters` of type `"string"` The names of the `params` must match the names of the `params` in the underlying `Task`
类型
array

.spec.finally[].matrix.include[].params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.finally[].matrix.params

描述
Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `"array"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `"string"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.
类型
array

.spec.finally[].matrix.params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.finally[].params

描述
Parameters declares parameters passed to this task.
类型
array

.spec.finally[].params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.finally[].pipelineRef

描述
PipelineRef is a reference to a pipeline definition Note: PipelineRef is in preview mode and not yet supported
类型
object
属性类型描述
apiVersionstring

API version of the referent

namestring

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

paramsarray

Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.

resolverstring

Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource, such as "git".

.spec.finally[].pipelineRef.params

描述
Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.
类型
array

.spec.finally[].pipelineRef.params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.finally[].runAfter

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

.spec.finally[].runAfter[]

类型
string

.spec.finally[].taskRef

描述
TaskRef is a reference to a task definition.
类型
object
属性类型描述
apiVersionstring

API version of the referent Note: A Task with non-empty APIVersion and Kind is considered a Custom Task

kindstring

TaskKind indicates the Kind of the Task:

  1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
  2. Custom Task when Kind is non-empty and APIVersion is non-empty
namestring

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

paramsarray

Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.

resolverstring

Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource, such as "git".

.spec.finally[].taskRef.params

描述
Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.
类型
array

.spec.finally[].taskRef.params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.finally[].when

描述
When is a list of when expressions that need to be true for the task to run
类型
array

.spec.finally[].when[]

描述
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
类型
object
属性类型描述
celstring

CEL is a string of Common Language Expression, which can be used to conditionally execute the task based on the result of the expression evaluation More info about CEL syntax: https://github.com/google/cel-spec/blob/master/doc/langdef.md

inputstring

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

operatorstring

Operator that represents an Input's relationship to the values

valuesarray

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

.spec.finally[].when[].values

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

.spec.finally[].when[].values[]

类型
string

.spec.finally[].workspaces

描述
Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
类型
array

.spec.finally[].workspaces[]

描述
WorkspacePipelineTaskBinding describes how a workspace passed into the pipeline should be mapped to a task's declared workspace.
类型
object
必填
name
属性类型描述
namestring

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

subPathstring

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

workspacestring

Workspace is the name of the workspace declared by the pipeline

.spec.params

描述
Params declares a list of input parameters that must be supplied when this Pipeline is run.
类型
array

.spec.params[]

描述
ParamSpec defines arbitrary parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun.
类型
object
必填
name
属性类型描述
default

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.

descriptionstring

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

enumarray

Enum declares a set of allowed param input values for tasks/pipelines that can be validated. If Enum is not set, no input validation is performed for the param.

namestring

Name declares the name by which a parameter is referenced.

propertiesobject

Properties is the JSON Schema properties to support key-value pairs parameter.

typestring

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

.spec.params[].enum

描述
Enum declares a set of allowed param input values for tasks/pipelines that can be validated. If Enum is not set, no input validation is performed for the param.
类型
array

.spec.params[].enum[]

类型
string

.spec.params[].properties

描述
Properties is the JSON Schema properties to support key-value pairs parameter.
类型
object

.spec.results

描述
Results are values that this pipeline can output once run
类型
array

.spec.results[]

描述
PipelineResult used to describe the results of a pipeline
类型
object
必填
namevalue
属性类型描述
descriptionstring

Description is a human-readable description of the result

namestring

Name the given name

typestring

Type is the user-specified type of the result. The possible types are 'string', 'array', and 'object', with 'string' as the default. 'array' and 'object' types are alpha features.

value

Value the expression used to retrieve the value

.spec.tasks

描述
Tasks declares the graph of Tasks that execute when this Pipeline is run.
类型
array

.spec.tasks[]

描述
PipelineTask defines a task in a Pipeline, passing inputs from both Params and from the output of previous tasks.
类型
object
属性类型描述
descriptionstring

Description is the description of this task within the context of a Pipeline. This description may be used to populate a UI.

displayNamestring

DisplayName is the display name of this task within the context of a Pipeline. This display name may be used to populate a UI.

matrixobject

Matrix declares parameters used to fan out this task.

namestring

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.

onErrorstring

OnError defines the exiting behavior of a PipelineRun on error can be set to [ continue | stopAndFail ]

paramsarray

Parameters declares parameters passed to this task.

pipelineRefobject

PipelineRef is a reference to a pipeline definition Note: PipelineRef is in preview mode and not yet supported

pipelineSpec

PipelineSpec is a specification of a pipeline Note: PipelineSpec is in preview mode and not yet supported Specifying PipelineSpec can be disabled by setting disable-inline-spec feature flag. See Pipeline.spec (API version: tekton.dev/v1)

retriesinteger

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

runAfterarray

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

taskRefobject

TaskRef is a reference to a task definition.

taskSpec

TaskSpec is a specification of a task Specifying TaskSpec can be disabled by setting disable-inline-spec feature flag. See Task.spec (API version: tekton.dev/v1)

timeoutstring

Time after which the TaskRun times out. Defaults to 1 hour. Refer Go's ParseDuration documentation for expected format: https://golang.org/pkg/time/#ParseDuration

whenarray

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

workspacesarray

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

.spec.tasks[].matrix

描述
Matrix declares parameters used to fan out this task.
类型
object
属性类型描述
includearray

Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.

paramsarray

Params is a list of parameters used to fan out the pipelineTask Params takes only Parameters of type "array" Each array element is supplied to the PipelineTask by substituting params of type "string" in the underlying Task. The names of the params in the Matrix must match the names of the params in the underlying Task that they will be substituting.

.spec.tasks[].matrix.include

描述
Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
类型
array

.spec.tasks[].matrix.include[]

描述
IncludeParams allows passing in a specific combinations of Parameters into the Matrix.
类型
object
属性类型描述
namestring

Name the specified combination

paramsarray

Params takes only Parameters of type "string" The names of the params must match the names of the params in the underlying Task

.spec.tasks[].matrix.include[].params

描述
Params takes only `Parameters` of type `"string"` The names of the `params` must match the names of the `params` in the underlying `Task`
类型
array

.spec.tasks[].matrix.include[].params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.tasks[].matrix.params

描述
Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `"array"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `"string"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.
类型
array

.spec.tasks[].matrix.params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.tasks[].params

描述
Parameters declares parameters passed to this task.
类型
array

.spec.tasks[].params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.tasks[].pipelineRef

描述
PipelineRef is a reference to a pipeline definition Note: PipelineRef is in preview mode and not yet supported
类型
object
属性类型描述
apiVersionstring

API version of the referent

namestring

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

paramsarray

Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.

resolverstring

Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource, such as "git".

.spec.tasks[].pipelineRef.params

描述
Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.
类型
array

.spec.tasks[].pipelineRef.params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.tasks[].runAfter

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

.spec.tasks[].runAfter[]

类型
string

.spec.tasks[].taskRef

描述
TaskRef is a reference to a task definition.
类型
object
属性类型描述
apiVersionstring

API version of the referent Note: A Task with non-empty APIVersion and Kind is considered a Custom Task

kindstring

TaskKind indicates the Kind of the Task:

  1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
  2. Custom Task when Kind is non-empty and APIVersion is non-empty
namestring

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

paramsarray

Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.

resolverstring

Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource, such as "git".

.spec.tasks[].taskRef.params

描述
Params contains the parameters used to identify the referenced Tekton resource. Example entries might include "repo" or "path" but the set of params ultimately depends on the chosen resolver.
类型
array

.spec.tasks[].taskRef.params[]

描述
Param declares an ParamValues to use for the parameter called name.
类型
object
必填
namevalue
属性类型描述
namestring
value

.spec.tasks[].when

描述
When is a list of when expressions that need to be true for the task to run
类型
array

.spec.tasks[].when[]

描述
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
类型
object
属性类型描述
celstring

CEL is a string of Common Language Expression, which can be used to conditionally execute the task based on the result of the expression evaluation More info about CEL syntax: https://github.com/google/cel-spec/blob/master/doc/langdef.md

inputstring

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

operatorstring

Operator that represents an Input's relationship to the values

valuesarray

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

.spec.tasks[].when[].values

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

.spec.tasks[].when[].values[]

类型
string

.spec.tasks[].workspaces

描述
Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.
类型
array

.spec.tasks[].workspaces[]

描述
WorkspacePipelineTaskBinding describes how a workspace passed into the pipeline should be mapped to a task's declared workspace.
类型
object
必填
name
属性类型描述
namestring

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

subPathstring

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

workspacestring

Workspace is the name of the workspace declared by the pipeline

.spec.workspaces

描述
Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun.
类型
array

.spec.workspaces[]

描述
PipelineWorkspaceDeclaration creates a named slot in a Pipeline that a PipelineRun is expected to populate with a workspace binding.
类型
object
必填
name
属性类型描述
descriptionstring

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.

namestring

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

optionalboolean

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

API 端点

可用的 API 端点如下:

  • /apis/tekton.dev/v1/namespaces/{namespace}/pipelines
    • DELETE: delete collection of Pipeline
    • GET: list objects of kind Pipeline
    • POST: create a new Pipeline
  • /apis/tekton.dev/v1/namespaces/{namespace}/pipelines/{name}
    • DELETE: delete the specified Pipeline
    • GET: read the specified Pipeline
    • PATCH: partially update the specified Pipeline
    • PUT: replace the specified Pipeline

/apis/tekton.dev/v1/namespaces/{namespace}/pipelines

HTTP 方法
DELETE
描述
delete collection of Pipeline
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
list objects of kind Pipeline
HTTP 响应
HTTP 状态码响应体
200 - OKPipelineList schema
401 - UnauthorizedEmpty
HTTP 方法
POST
描述
create a new Pipeline
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyPipeline schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKPipeline schema
201 - CreatedPipeline schema
202 - AcceptedPipeline schema
401 - UnauthorizedEmpty

/apis/tekton.dev/v1/namespaces/{namespace}/pipelines/{name}

HTTP 方法
DELETE
描述
delete the specified Pipeline
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
read the specified Pipeline
HTTP 响应
HTTP 状态码响应体
200 - OKPipeline schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update the specified Pipeline
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKPipeline schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace the specified Pipeline
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyPipeline schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKPipeline schema
201 - CreatedPipeline schema
401 - UnauthorizedEmpty