A task
is an activity that can be reused and defines a series of steps that deliver the task's functionality. A clustertask
is a task that has the scope of an entire cluster. It is composed of the following main properties:
steps
: The list ofsteps
that will implement the task's behavior.params
: (Optional) Parameters that can be used to modify certain values in atask.
workspaces
: (Optional) The list of workspaces. Useworkspaces
to store files generated by steps in atask
.results
: (Optional) Can be used to store small values as pod's termination messages.stepTemplate
: (Optional) Can be used to define default values forsteps
in this file.
A taskrun
is a definition of how a task
should execute in a cluster and it follows the task
up to the completion of the defined steps
. It is composed of the following main properties:
taskRef
: has the name of the task that needs to be execute.status
: This field is updated whenever thetaskrun
finishes its execution.podTemplate
: (Optional) Specifies the contents of the pod template that will be used as the basis for thetask
pod. The full list of supported fields can be found here.
A pipeline
is a series of tasks that provides the workflow to deliver or deploy an artifact. It is comprised of the following main properties:
spec
: Specifies the configuration information for this Pipeline object. This must include:tasks
: Specifies the Tasks that composed the Pipeline and the details of their execution.
task
resources.inputs
/resources.output
from
: Indicates the data for aPipelineResource
originates from the output of a previousTask
.
runAfter
: Indicates that aTask
should execute after one or more otherTasks
without output linking.retries
: Specifies the number of times to retry the execution of aTask
after a failure. Does not apply to execution cancellations.conditions
: Specifies Conditions that only allow aTask
to execute if they evaluate totrue
.timeout
: Specifies the timeout before aTask
fails.
results
: Specifies the location to which thePipeline
emits its execution results.description
: Holds an informative description of thePipeline
object.
A pipelinerun
is a definition of how a pipeline
should execute in a cluster and it follows up to the completion of the defined tasks
. It is composed of the following main properties:
Take a look at how to generate a task
. Verify how easy it is to create a new task
.
$ k apply -f 00-echo
$ kubectl apply -f 01-workspaces
$ kubectl apply -f 02-results
$ kubectl apply -f 03-step-template
$ kubectl apply -f 10-simple-pipeline
$ kubectl apply -f 11-triggers
$ kubectl apply -f 12-complex-pipeline