update-konflux-tasks
Skill551 starsChanged 6 months agoApache-2.0View on GitHub
Automatically update outdated Konflux Tekton tasks based on enterprise contract verification logs.
- Installs packages
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api/AGENTS.mdAGENTS.md
- control-plane-operator/AGENTS.mdAGENTS.md
- .cursor/rules/100-go-mistakes.mdcCursor rule
- .cursor/rules/code-formatting.mdcCursor rule
- .cursor/rules/code-review.mdcCursor rule
- .cursor/rules/create-jira-items.mdcCursor rule
- .cursor/rules/debug-aro-hcp-e2e.mdcCursor rule
- .cursor/rules/git-commit-format.mdcCursor rule
- .cursor/rules/restructure-commits.mdcCursor rule
- create-cpo-overrideSkill
- Debug ClusterSkill
- e2e-analyzeSkill
- Effective GoSkill
- feature-developmentSkill
- fix-hypershift-repo-robot-prSkill
- Git Commit FormatSkill
- konflux-buildSkill
- Konflux Archived PipelineRunsSkill
- pr-reportSkill
- restructure-commitsSkill
- test-tag-pipelineSkill
- triage-leaked-infraSkill
- validate-pr-override-imagesSkill
- Git Commit FormatSkill
- restructure-commitsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 15 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
When a log file is provided: Parses Konflux enterprise contract verification logs for outdated task warnings
- Very specific: line 23
When no log file is provided: Uses hack/tools/scripts/update_trusted_task_bundles.py --dry-run --json to detect updates
- Distinctive: line 31
If a log file is provided ({{args.0}}):
- Distinctive: line 32
Read the provided log file
- Distinctive: line 35
If no log file is provided:
- Distinctive: line 44
Create a mapping of: task-name → current-version@digest → latest-version@digest
- Very specific: line 48
If a task matches quay.io/redhat-appstudio-tekton-catalog/ rather than quay.io/konflux-ci/tekton-catalog, we should check if it is …
- Very specific: line 49
Use URL pattern: https://github.com/konflux-ci/build-definitions/blob/main/task/{task-name}/{version}/MIGRATION.md
- Very specific: line 50
If the migration notes reference a migration script, check their availability with the pattern: …
- Distinctive: line 51
Run the migration script on the identified pipeline files
- Distinctive: line 53
Ask the user for input in any manual steps are required
- Distinctive: line 59
Use MultiEdit for efficiency when updating multiple tasks per file
- Distinctive: line 96
If log file is provided but doesn't exist, provide clear error message
- Very specific: line 97
If no log file is provided and update_trusted_task_bundles.py fails, provide error details
- Distinctive: line 98
If skopeo is not installed, provide installation instructions
- Distinctive: line 99
If jq is not installed, provide installation instructions
- Distinctive: line 100
If yq is not installed, provide installation instructions
- Very specific: line 101
If PyYAML is not installed (required for update_trusted_task_bundles.py), provide installation instructions: pip install pyyaml
- Distinctive: line 102
If no outdated tasks found, report success with no changes needed
- Distinctive: line 103
If migration notes URL returns 404, note that no migration documentation exists
- Distinctive: line 104
If migration notes include changes that to parameters, output or manual steps, prompt the user about them
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Automatically update outdated Konflux Tekton tasks based on enterprise contract verification logs or by detecting updates directly.
[Extended thinking: This command can either parse enterprise contract logs or use the update_trusted_task_bundles.py script to identify outdated Tekton tasks, uses skopeo to map digests to version tags, checks migration notes for breaking changes, and updates all pipeline YAML files in the .tekton/ directory with the latest versions.]
Konflux Tekton Tasks Update
Usage Examples:
- Update tasks from enterprise contract log:
/update-konflux-tasks ../../hypershift-operator-enterprise-contract-lxgvw-verify.log - Detect and update tasks automatically (no log file):
/update-konflux-tasks
Implementation Details:
- When a log file is provided: Parses Konflux enterprise contract verification logs for outdated task warnings
- When no log file is provided: Uses
hack/tools/scripts/update_trusted_task_bundles.py --dry-run --jsonto detect updates - Uses
skopeo inspectto map SHA256 digests to proper version tags - Checks migration documentation for version bumps
- Requires
skopeoandjqto be installed
Process Flow:
- Detect Outdated Tasks:
- If a log file is provided ({{args.0}}):
- Read the provided log file
- Extract all outdated Tekton task warnings that mention "newer version exists"
- Parse out task names, current digests, and latest digests
- If no log file is provided:
- Run
hack/tools/scripts/update_trusted_task_bundles.py $(find .tekton -name '*.yaml') --dry-run --json --upgrade-versions - Parse the JSON output to identify tasks needing updates
- The JSON output contains updates and available_upgrades per file with task_name, current_version, current_digest, latest_version, latest_digest, and is_version_bump fields
- Run
- If a log file is provided ({{args.0}}):
- Map Latest Digests to Version Tags:
- For each outdated task, use the helper script
hack/tools/scripts/find_task_version_by_digest.sh <task-name> <digest>to determine the proper version tag for the latest digest - The helper script uses
skopeo list-tagsandskopeo inspectto find which semantic version tag (e.g., 0.2, 0.3) matches the given digest - It filters out commit-hash style tags (e.g., "0.2-f788d9b...") and only returns clean semantic versions
- Create a mapping of: task-name → current-version@digest → latest-version@digest
- For each outdated task, use the helper script
- Check for Migration Notes:
- For any tasks with version bumps (not just digest updates), check for migration notes
- If a task matches quay.io/redhat-appstudio-tekton-catalog/ rather than quay.io/konflux-ci/tekton-catalog, we should check if it is available in quay.io/konflux-ci/tekton-catalog and change to use the latter.
- Use URL pattern:
https://github.com/konflux-ci/build-definitions/blob/main/task/{task-name}/{version}/MIGRATION.md - If the migration notes reference a migration script, check their availability with the pattern:
https://github.com/konflux-ci/build-definitions/blob/main/task/{task-name}/{version}/migrations/{version}.sh. If it is available:- Run the migration script on the identified pipeline files
- Extract any breaking changes, new parameters, or manual steps required
- Ask the user for input in any manual steps are required
- Report if "No action required" or list specific migration steps
- Update Pipeline Files:
- Discover all Tekton pipeline YAML files using the glob
.tekton/**/*.yaml - Replace old
quay.io/konflux-ci/tekton-catalog/task-{name}:{old-version}@{old-digest}with new versions - Use MultiEdit for efficiency when updating multiple tasks per file
- Discover all Tekton pipeline YAML files using the glob
- Provide Comprehensive Summary:
- List all outdated tasks found and their update status
- Show current vs. latest version mappings
- Highlight any version bumps vs. digest-only updates
- Report any migration notes or manual steps required
- List all files updated
- Provide before/after examples for key changes
Expected Output Format:
## 🔄 Konflux Tekton Tasks Update Complete
### Tasks Updated:
- ✅ apply-tags: 0.2@old-digest → 0.2@new-digest (digest update)
- ✅ buildah-remote-oci-ta: 0.4@old-digest → 0.5@new-digest (VERSION BUMP - migration notes checked)
- ✅ init: 0.2@old-digest → 0.2@new-digest (digest update)
[... etc for all tasks]
### Files Updated:
- ✅ .tekton/hypershift-operator-main-push.yaml (8 tasks updated)
- ✅ .tekton/hypershift-operator-main-pull-request.yaml (8 tasks updated)
[... etc for all files]
### Migration Notes:
- buildah-remote-oci-ta v0.4→v0.5: ✅ No action required (bug fix for SBOM generation)
### Summary:
- Total tasks updated: X
- Version bumps: X (with migration notes checked)
- Digest updates: X
- Files updated: X
- Manual steps required: None / [list steps]Error Handling:
- If log file is provided but doesn't exist, provide clear error message
- If no log file is provided and update_trusted_task_bundles.py fails, provide error details
- If skopeo is not installed, provide installation instructions
- If jq is not installed, provide installation instructions
- If yq is not installed, provide installation instructions
- If PyYAML is not installed (required for update_trusted_task_bundles.py), provide installation instructions:
pip install pyyaml - If no outdated tasks found, report success with no changes needed
- If migration notes URL returns 404, note that no migration documentation exists
- If migration notes include changes that to parameters, output or manual steps, prompt the user about them
Safety Features:
- ✅ Preserves version tags (e.g., keeps
0.2intask:0.2@sha256:...) - ✅ Checks migration notes for breaking changes before major version bumps
- ✅ Provides detailed summary of all changes made
- ✅ Use TodoWrite to track progress through complex multi-file updates
Requirements:
skopeomust be installed (for container image inspection)jqmust be installed (for JSON parsing)yqmust be installed (for YAML parsing and checking multi-platform builds)pyyamlPython package must be installed when running without a log file (for update_trusted_task_bundles.py)- Internet connectivity (to check migration notes and inspect container images)
Arguments:
- {{args.0}}: Path to the enterprise contract verification log file that contains outdated task warnings (optional). When not provided, the skill uses
hack/tools/scripts/update_trusted_task_bundles.py --dry-run --jsonto automatically detect outdated tasks.
The command will provide progress updates and automatically update all relevant Tekton pipeline files with the latest task versions.
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.

