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 ofstepsthat 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. Useworkspacesto 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 forstepsin 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 thetaskrunfinishes its execution.podTemplate: (Optional) Specifies the contents of the pod template that will be used as the basis for thetaskpod. 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.
taskresources.inputs/resources.outputfrom: Indicates the data for aPipelineResourceoriginates from the output of a previousTask.
runAfter: Indicates that aTaskshould execute after one or more otherTaskswithout output linking.retries: Specifies the number of times to retry the execution of aTaskafter a failure. Does not apply to execution cancellations.conditions: Specifies Conditions that only allow aTaskto execute if they evaluate totrue.timeout: Specifies the timeout before aTaskfails.
results: Specifies the location to which thePipelineemits its execution results.description: Holds an informative description of thePipelineobject.
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