feat: add workflow to trigger image rebuilds across downstream repos#577
feat: add workflow to trigger image rebuilds across downstream repos#577pramodbindal merged 7 commits intomainfrom
Conversation
Adds a manually-dispatched workflow that triggers Konflux image rebuilds by updating .konflux/patches/.placeholder in each downstream repo. Creates the placeholder file if it doesn't already exist. Inputs: - version: release version (e.g., "1.15", "next") - repo: optional filter to target a specific repo Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add set -euo pipefail to catch silent failures - Validate version format (must be 'next' or 'X.Y') - Detect repo name typos (error when target repo not found in config) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Merge identical update/create code paths into one with conditional SHA arg - Check PUT exit code and track FAILED counter separately - Remove --silent so API errors are visible in workflow logs - Use base64 -w 0 to prevent platform-dependent line wrapping - Exit non-zero if any repo failed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents two dispatches for the same version from racing on SHA fetch/PUT across repos. Matches pattern used by generate-konflux.yaml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents supply chain attacks and breaking changes from unpinned latest version. Verifies checksum before installing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Writes a markdown summary with repo links, branch, status, and commit links so operators can verify rebuilds without checking each repo individually. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| exit 1 | ||
| fi | ||
|
|
||
| if [[ "$VERSION" == "next" ]]; then |
There was a problem hiding this comment.
for next version branch is next only
|
@waveywaves I think this will only work for the new config. i.e 1.21 and above |
Downstream repos use a 'next' branch, not 'main'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@divyansh42 Thanks for the review! I looked into this and both old (1.15) and new (1.22) versions have So touching Also fixed @pramodbindal's comment — |
We are migrating all the releases to follow same pattern. |
Thanks for clarifying that @pramodbindal |
Summary
trigger-image-rebuilds.yaml.konflux/patches/.placeholderin each downstream repo.placeholderfile if it doesn't already exist in a repoInputs
version1.15,1.22,next) — maps torelease-v{version}.xbranch (nextmaps tomain)repoHow it works
config/downstream/repos/*.yaml.konflux/patches/.placeholderexists on that branchrebuild <timestamp>contentTest plan
version=1.15andrepo=tektoncd-resultsto test single-repo mode.placeholderfile is updated and a Konflux build is triggeredversion=1.15and empty repo to test all-repos mode