Debugging pipelines
As you build your first pipelines, you will inevitably encounter some issues. Writing pipeline definitions without getting a failing pod is just as likely as writing a piece of software without running into a bug, yet there are ways to figure out what is happening inside those pods and potentially identify issues that are causing the pipeline to break.
Let's start by creating a first task that will intentionally fail. This task will have a non-existing base image for one of the steps, and you will see how you can debug this issue when the pipeline stalls:
- In a file named
invalid-image-task.yaml
, add a new task calledinvalid-image
:apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: invalid-image spec: steps:
- Add a single step called
log
, which will use an invalid image name:- name: log image: invaliduser/nonexistingimage
- To be compliant with the task definition...