mit einem Klick
debugging-task-failures
// Use when a Tekton task test fails in CI or locally and you need to find the root cause
// Use when a Tekton task test fails in CI or locally and you need to find the root cause
| name | debugging-task-failures |
| description | Use when a Tekton task test fails in CI or locally and you need to find the root cause |
Task tests run as Tekton PipelineRuns in isolated namespaces. Debugging requires inspecting the PipelineRun, TaskRun, and pod logs in the test namespace.
The test runner creates namespace {task-name}-{version-with-hyphens}. Example: task yaml-lint version 0.1 runs in namespace yaml-lint-0-1.
NS="<task-name>-<version-hyphens>"
kubectl get pipelinerun -n "$NS"
kubectl get taskrun -n "$NS"
# All logs for a pipelinerun
tkn pr logs <pipelinerun-name> -n "$NS"
# Specific taskrun
tkn tr logs <taskrun-name> -n "$NS"
# Raw pod logs (if tkn output is truncated)
kubectl logs -n "$NS" -l tekton.dev/pipelineRun=<pipelinerun-name> --all-containers
kubectl get events -n "$NS" --sort-by=.lastTimestamp
kubectl get task <task-name> -n "$NS" -o yaml
If a pre-apply-task-hook.sh exists, verify its resources were created:
kubectl get all -n "$NS"
kubectl get pvc,configmap,secret -n "$NS"
| Symptom | Likely Cause |
|---|---|
ImagePullBackOff | Image digest wrong or registry auth missing |
| Task passes but negative test reports success | test/assert-task-failure annotation value doesn't match pipeline task name |
No such file or directory in script | PVC data path mismatch between setup and task steps |
Pipeline stuck in Unknown | Cluster resource limits or Tekton controller not ready |
Permission denied | Missing RBAC — add RoleBinding in pre-apply hook |
tasks/**/*.{yaml,sh} are testedUse when confused by CI behavior, investigating why tests did or did not run, or troubleshooting GitHub Actions workflows
Use when preparing, reviewing, or finalizing a pull request to this Tekton catalog repository
Use when running, writing, or troubleshooting functional tests for Tekton tasks in this catalog
Use when setting up or tearing down a local kind cluster for running Tekton task tests