This document helps new users quickly understand and use Tekton Pipelines to create a simple CI/CD workflow.
Tekton is an open-source cloud native CI/CD (Continuous Integration and Continuous Delivery/Deployment) solution. It provides Kubernetes-native building blocks for creating containerized, standardized, and portable CI/CD pipelines.
15-20 minutes
Step | Operation | Description |
---|---|---|
1 | Create a "Hello World" Task | Create a basic Task that outputs a greeting message |
2 | Create a "Goodbye" Task | Create a second Task that accepts parameters |
3 | Create a Pipeline | Create a Pipeline that combines both Tasks in sequence |
4 | Run the Pipeline | Execute the Pipeline and view the results |
5 | Clean up | Remove the created resources |
A Task is the basic building block of a Tekton Pipeline. It consists of a series of steps that run sequentially in a container.
hello-task.yaml
with the following content:Please replace the ubuntu
image with an actual accessible image, same below.
Apply the Task to your cluster:
A TaskRun
object instantiates and executes this Task. Create another file named hello-world-run.yaml
with the following content:
Apply the TaskRun
to your cluster:
Monitor the TaskRun execution:
You should see output similar to:
Take a look at the logs:
You should see output similar to:
Now let's create a second Task that accepts parameters to make it more flexible.
goodbye-task.yaml
with the following content:Apply the Task to your cluster:
A Pipeline defines an ordered series of Tasks arranged in a specific execution order as part of your CI/CD workflow.
hello-goodbye-pipeline.yaml
with the following content:This Pipeline:
username
hello
and goodbye
goodbye
should run after hello
completesgoodbye
TaskApply the Pipeline to your cluster:
A PipelineRun is used to execute a Pipeline and provide any required parameters.
hello-goodbye-pipeline-run.yaml
with the following content:Apply the PipelineRun to your cluster to start the Pipeline:
Monitor the Pipeline execution:
You should see output similar to:
To remove the resources created in this tutorial: