tekton-pipelines
Skill4 starsChanged 5 months agoMITView on GitHub
Authoring Tekton PipelineRun/TaskRun YAML — resolver-based task refs, git auth, node targeting, matrix+param scheduling, when/CEL expressions, finally tasks, timeouts, and troubleshooting tekton.dev/v1 patterns.
In this repository74 other files it gives its agents.
- AGENTS.mdAGENTS.md
- atlasSkill
- cert-managerSkill
- cilium-gatewaySkill
- cilium-networkSkill
- cnpgSkill
- dragonflySkill
- external-dnsSkill
- external-secretsSkill
- flaggerSkill
- fluxSkill
- gitea-apiSkill
- gitea-registrySkill
- gitea-runnerSkill
- giteaSkill
- gitea-teaSkill
- gitea-webhooksSkill
- harbor-apiSkill
- harbor-helmSkill
- harborSkill
- harbor-terraformSkill
- helm-chartSkill
- helm-opsSkill
- helmSkill
- higress-helmSkill
- higress-operatorSkill
- higressSkill
- kserve-helmSkill
- kserve-operatorSkill
- kserveSkill
- kubeflow-pipelinesSkill
- kubeflowSkill
- kubeflow-trainerSkill
- kubeflow-training-operatorSkill
- mariadb-helmSkill
- mariadb-operatorSkill
- mariadbSkill
- netbird-cliSkill
- netbird-operatorSkill
- netbird-serverSkill
- netbirdSkill
- netbird-terraformSkill
- nextcloud-apiSkill
- nextcloud-helmSkill
- nextcloudSkill
- nvidia-device-pluginSkill
- rook-ceph-operatorSkill
- rook-cephSkill
- rook-ceph-toolboxSkill
- sealed-secretsSkill
- stakater-reloaderSkill
- tailscaleSkill
- tailscale-talosSkill
- talosconfigSkill
- talosctlSkill
- talosSkill
- talos-terraformSkill
- tekton-operatorSkill
- tekton-pacSkill
- tektonSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Prefer resolvers over embedded TaskSpecs:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tekton Pipelines — Authoring
For installing/configuring Tekton components see tekton-operator. For Git-native CI (pipelines in .tekton/) see tekton-pac.
Kubernetes-native CI/CD. Covers tekton.dev/v1 patterns.
When to Use
- Authoring PipelineRun / TaskRun YAML
- Configuring git/cluster/hub resolvers
- Setting nodeSelector/tolerations/affinity for CI pods
- Dynamic per-task node targeting via taskRunSpecs
- Matrix + param dynamic scheduling
- CEL when expressions
- Timeout hierarchy
- finally tasks
Not for: Tekton operator install/upgrade (see tekton-operator), Pipelines-as-Code / Git-triggered CI (see tekton-pac).
Core Patterns
Resolver-Based Task Refs
Prefer resolvers over embedded TaskSpecs:
tasks:
- name: build
taskRef:
resolver: git
params:
- name: url
value: https://github.com/org/repo
- name: revision
value: main
- name: pathInRepo
value: ci/tasks/build.yamlResolvers: git, cluster, hub. See TTL section below for cache config.
Git Authentication (Private Repos)
Authenticate against private Git repositories via the ServiceAccount's secrets — Tekton's creds-init init container reads kubernetes.io/basic-auth secrets automatically and configures git before any task step runs. No workspace plumbing needed.
# 1. Create the secret with annotation targeting the host
apiVersion: v1
kind: Secret
metadata:
name: git-creds
annotations:
tekton.dev/git-0: https://git.example.com # host-wide, any repo
type: kubernetes.io/basic-auth
stringData:
username: <user-or-bot-name>
password: <pat-or-token>
# 2. Attach to the PipelineRun's ServiceAccount
apiVersion: v1
kind: ServiceAccount
metadata:
name: default # or a dedicated pipeline SA
secrets:
- name: git-credsFor multiple hosts, increment the annotation index:
metadata:
annotations:
tekton.dev/git-0: https://github.com
tekton.dev/git-1: https://gitlab.comPer-repo targeting (full path):
metadata:
annotations:
tekton.dev/git-0: https://github.com/org/repogit-clone task with basic-auth workspace (alternative approach):
workspaces:
- name: basic-auth
secret:
secretName: git-basic-auth-creds # Opaque secret with .gitconfig + .git-credentials keysThe SA-based approach is preferred — it works for ALL git operations in the PipelineRun (clone, tag, push), not just the git-clone task. It also works automatically with the hub resolver's git resolution.
Node Targeting via podTemplate
Uniform placement across pipeline:
taskRunTemplate:
podTemplate:
nodeSelector:
role: ci-worker
tolerations:
- key: ci
operator: Exists
effect: NoSchedulePer-task override via taskRunSpecs:
taskRunSpecs:
- pipelineTaskName: gpu-build
taskPodTemplate:
nodeSelector:
node-type: gpuMatrix + Param Dynamic Scheduling
Drive node selection from array params:
params:
- name: architectures
type: array
default: ["amd64", "arm64"]
tasks:
- name: build
params:
- name: arch
value: "$(params.arch)"
matrix:
params:
- name: arch
value: "$(params.architectures)"
taskRunTemplate:
podTemplate:
nodeSelector:
kubernetes.io/arch: "$(params.arch)"When / CEL
Standard conditions:
when:
- input: "$(params.deploy-env)"
operator: in
values: ["staging", "production"]CEL (v1.13+):
when:
- cel: "body.action in ['opened', 'synchronize'] && body.repository.fork == false"Finally Tasks
finally:
- name: notify
taskRef:
resolver: git
params:
- name: url
value: https://github.com/org/repo
- name: pathInRepo
value: ci/tasks/notify.yaml
when:
- input: "$(tasks.build.status)"
operator: in
values: ["Succeeded", "Failed"]Timeout Hierarchy
PipelineRun (1h) → TaskRun (1h) → StepSet step timeouts for external ops:
steps:
- name: git-clone
timeout: "2m"
script: |
git clone $(params.repo-url)Resolver Cache TTL
Caches resolved task/pipeline refs to reduce source API calls and speed up runs. Default: 5min TTL, 1000 entries.
Two levels:
Global — ConfigMap resolver-cache-config:
data:
default-ttl: "5m" # s/m/h suffixes
max-size: "1000"Per-resolver — default-ttl in resolver's own ConfigMap (v1.13+):
metadata:
name: git-resolver-config
data:
default-ttl: "1h"
fetch-timeout: "1m"Per-resolver default-cache-mode: always, never, auto.
Quick Reference
| Pattern | Mechanism | Scope |
| Uniform node placement | taskRunTemplate.podTemplate | Pipeline-wide |
| Per-task node placement | taskRunSpecs[].taskPodTemplate | Single task |
| Dynamic arch/OS scheduling | matrix + param substitution | Task matrix |
| Conditional execution | when / CEL | Per task/finally |
| Task reference | resolver (git/cluster/hub) | Task definition |
| Post-pipeline cleanup | finally tasks | Pipeline end |
| Timeout control | timeout fields | Pipeline/Task/Step |
Common Mistakes
- Using
v1beta1→ Usetekton.dev/v1 - Inline TaskSpec → Use resolvers
- podTemplate on every task → taskRunSpecs for per-task, podTemplate for uniform
- CEL in wrong field → Use
cel:notinput:/values: - forgetting finally timeout → Set explicitly; inherits pipeline default
- matrix with scalar param → matrix requires array-typed params
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

