Building your first pipeline
For this first pipeline, you will create a task that will output some text, similar to the hello world
task used in the last chapter. You will then use this task to build your first pipeline:
- First, start with your basic t
ask
object in a file calledhello-pipeline.yaml
:apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: first-task spec: steps:
- By now, you know that you can create a simple step that produces an
echo
statement using a UBI container. You can keep this step with the minimal information necessary to run:- image: registry.access.redhat.com/ubi8/ubi-minimal command: - /bin/bash args: ['-c', 'echo Hello from first task']
Note
You can add multiple Tekton objects in a YAML file using the
---
separator in your file. - You can now add the pipeline base definition...