Automate complete Multicluster Global Hub release workflow across 6 repositories including branch creation, OpenShift CI configuration, catalog OCP version management, bundle updates, and PR creation...
Automates the complete end-to-end workflow for cutting a new Multicluster Global Hub release across all 6 repositories with full automation.
CRITICAL - Synchronous Execution Required:
Run Synchronously: Execute the cut-release.sh script using the Bash tool WITHOUT the run_in_background parameter. The script must run synchronously to completion with a 600000ms (10 minute) timeout.
No BashOutput Calls: DO NOT use the BashOutput tool. The command runs synchronously and returns complete output when finished.
RELEASE_BRANCH must be explicitly specified - The skill does NOT auto-detect release versions. You must provide the exact release branch name.
Two Operating Modes:
CREATE_BRANCHES=true: Create new release branches and push directly to upstream (for initial release creation)CREATE_BRANCHES=false (default): Update existing release branches via PR (for updating current releases)The skill uses ACM release branch names as the primary input and automatically calculates the corresponding Global Hub version.
| ACM Version | Release Branch | Global Hub Version | Bundle/Catalog Branch | OCP Versions |
|---|---|---|---|---|
| 2.14 | release-2.14 | v1.5.0 | release-1.5 | 4.15 - 4.19 |
| 2.15 | release-2.15 | v1.6.0 | release-1.6 | 4.16 - 4.20 |
| 2.16 | release-2.16 | v1.7.0 | release-1.7 | 4.17 - 4.21 |
| 2.17 | release-2.17 | v1.8.0 | release-1.8 | 4.18 - 4.22 |
| 2.18 | release-2.18 | v1.9.0 | release-1.9 | 4.19 - 4.23 |
Formulas:
Example: ACM release-2.17 ā Global Hub v1.8.0 ā Bundle/Catalog release-1.8
The skill manages releases across 6 repositories, each with its own dedicated script.
Version example below uses release-2.17 / Global Hub v1.8.0 (globalhub-1-8)
Repository: stolostron/multicluster-global-hub
What it does (3-part workflow):
.tekton/ configuration files for new version (e.g., globalhub-1-8) with target_branch="main", updates Containerfile.* version labels.tekton/ files to set target_branch to the previous release branch (e.g., globalhub-1-7 files updated to target_branch="release-2.16")Key behavior:
.tekton/ files (e.g., globalhub-1-8) created by copying old files (globalhub-1-7), not renaming.tekton/ files (globalhub-1-7) remain on main with target_branch="main"main will be automatically synced to the current release branch (release-2.17) after the PR is merged ā no separate PR needed for the current release branchExpected PRs: 2
| PR | Target Branch | Content | Verification |
|---|---|---|---|
| PR to main | main |
New .tekton/globalhub-1-8-*.yaml files; old globalhub-1-7 files removed; Containerfile version updated; Makefile VERSION/CHANNELS updated |
Check .tekton/ has globalhub-1-8 files with target_branch=main (pull-request) and target_branch=release-2.17 (push) |
| PR to prev release | release-2.16 |
globalhub-1-7 pull-request.yaml target_branch changed from main ā release-2.16 |
Verify *pull-request.yaml has target_branch=release-2.16 |
Repository: openshift/release
What it does:
make update + make jobsExpected PRs: 1
| PR | Target Branch | Content | Verification |
|---|---|---|---|
| PR to main | main |
ci-operator/config/stolostron/multicluster-global-hub/stolostron-multicluster-global-hub-release-2.17.yaml created; main config updated with new release references |
Check config file exists and contains branch: release-2.17, name: "2.17", release-218 prefix |
Repository: stolostron/multicluster-global-hub-operator-bundle
What it does:
release-2.17 in title) and copies bundle content (manifests/, metadata/, tests/) from that PR's branch; falls back to upstream/main if no open PR foundimages_digest_mirror_set.yaml with new image tagskonflux-patch.sh image references and version replacementExpected PRs: 1
| PR | Target Branch | Content | Verification |
|---|---|---|---|
| PR to release branch | release-1.8 |
Bundle content synced from MGH release PR branch; tekton pipelines renamed globalhub-1-7 ā globalhub-1-8; image tags updated; konflux-patch.sh updated | Check bundle/manifests/*.clusterserviceversion.yaml has version 1.8.0-dev, skipRange >=1.7.0 <1.8.0; .tekton/ has *globalhub-1-8*.yaml |
Repository: stolostron/multicluster-global-hub-operator-catalog
What it does:
images-mirror-set.yaml with new image tagsREADME.md with new version informationOCP Version Formula: OCP_MIN = 4.(10 + GH_MINOR), OCP_MAX = OCP_MIN + 4
Expected PRs: 2
| PR | Target Branch | Content | Verification |
|---|---|---|---|
| PR to main | main |
New release-1.8 catalog config; OCP version lifecycle managed | Check README lists OCP 4.18-4.22; new OCP pipeline added |
| PR to catalog branch | release-1.8 |
pipeline updates, image mirror set updated | Check images-mirror-set.yaml has globalhub-1-8 tags |
Repository: stolostron/glo-grafana
What it does:
Expected PRs: 1
| PR | Target Branch | Content | Verification |
|---|---|---|---|
| PR to grafana branch | release-1.8 |
tekton pipelines renamed globalhub-1-7 ā globalhub-1-8; branch references updated | Check .tekton/ has glo-grafana-globalhub-1-8-pull-request.yaml and glo-grafana-globalhub-1-8-push.yaml |
Repository: stolostron/postgres_exporter
What it does:
Expected PRs: 1
| PR | Target Branch | Content | Verification |
|---|---|---|---|
| PR to release branch | release-2.17 |
tekton pipelines renamed globalhub-1-7 ā globalhub-1-8; branch references updated | Check .tekton/ has postgres-exporter-globalhub-1-8-pull-request.yaml and postgres-exporter-globalhub-1-8-push.yaml |
| Repo | PRs | Branches |
|---|---|---|
| multicluster-global-hub | 2 (main, prev-release) | release-2.17 |
| openshift/release | 1 (main) | ā |
| operator-bundle | 1 (release-1.8) | release-1.8 |
| operator-catalog | 2 (main, release-1.8) | release-1.8 |
| glo-grafana | 1 (release-1.8) | release-1.8 |
| postgres_exporter | 1 (release-2.17) | release-2.17 |
| Total | 8 PRs | 5 branches |
.claude/skills/cut-release/
āāā SKILL.md # This file
āāā README.md # User documentation
āāā scripts/
āāā cut-release.sh # Main orchestration script
āāā 01-multicluster-global-hub.sh # Main repo (creates version bump PR)
āāā 02-openshift-release.sh # CI config (creates PR)
āāā 03-bundle.sh # Bundle (creates PR)
āāā 04-catalog.sh # Catalog (creates 2 PRs)
āāā 05-grafana.sh # Grafana (branch only)
āāā 06-postgres-exporter.sh # Postgres exporter (branch only)
IMPORTANT: RELEASE_BRANCH environment variable is REQUIRED for all execution modes.
The main orchestration script supports three modes:
RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh
Prompts user to select which repositories to update (1-6, comma-separated, or all).
RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh all
Updates all 6 repositories in sequence.
RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh 1,2,3 # Update specific repos
RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh 3,4 # Update only bundle and catalog
CREATE_BRANCHES=true RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh all
Creates new release branches and pushes directly to upstream (requires write access).
CREATE_BRANCHES=false RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh all
# or simply:
RELEASE_BRANCH=release-2.17 ./scripts/cut-release.sh all
Updates existing release branches by creating pull requests.
Each script can be run independently:
RELEASE_BRANCH="release-2.17" GH_VERSION="v1.8.0" CREATE_BRANCHES=false ./scripts/03-bundle.sh
The main orchestration script calculates and exports these variables for child scripts:
| Variable | Description | Example | Required |
|---|---|---|---|
RELEASE_BRANCH |
ACM release branch | release-2.17 |
YES - Must be explicitly set |
CREATE_BRANCHES |
Operating mode (true/false) | false |
Optional (default: false) |
GITHUB_USER |
GitHub username for PRs | yanmxa |
Optional (auto-detected from git) |
ACM_VERSION |
ACM version number | 2.17 |
Auto-calculated |
GH_VERSION |
Global Hub version | v1.8.0 |
Auto-calculated |
GH_VERSION_SHORT |
Short Global Hub version | 1.8 |
Auto-calculated |
BUNDLE_BRANCH |
Bundle release branch | release-1.8 |
Auto-calculated |
BUNDLE_TAG |
Bundle image tag | globalhub-1-8 |
Auto-calculated |
CATALOG_BRANCH |
Catalog release branch | release-1.8 |
Auto-calculated |
CATALOG_TAG |
Catalog image tag | globalhub-1-8 |
Auto-calculated |
GRAFANA_BRANCH |
Grafana release branch | release-1.8 |
Auto-calculated |
GRAFANA_TAG |
Grafana tag | globalhub-1-8 |
Auto-calculated |
POSTGRES_TAG |
Postgres image tag | globalhub-1-8 |
Auto-calculated |
OCP_MIN |
Minimum OCP version number | 418 |
Auto-calculated |
OCP_MAX |
Maximum OCP version number | 422 |
Auto-calculated |
OPENSHIFT_RELEASE_PATH |
Path to openshift/release clone | /tmp/openshift-release |
Optional |
WORK_DIR |
Working directory for repos | /tmp/globalhub-release-repos |
Optional |
Individual scripts can be run standalone by providing the required variables.
All scripts are compatible with:
sed -i "" syntaxsed -i syntaxScripts automatically detect the OS and use the appropriate sed syntax.
gh) authenticated with your accountmake update)When running the complete workflow (cut-release.sh all):
After running all 6 scripts:
Pull Requests Expected: up to 8 PRs
Each PR is only created if changes are needed. If the target branch is already up-to-date or an open PR already exists, the script will skip or reuse it.
| # | Repo | Target Branch | Content |
|---|---|---|---|
| 1 | multicluster-global-hub | main |
New globalhub-1-8 tekton configs, Containerfile/Makefile version bump |
| 2 | multicluster-global-hub | release-2.16 |
Update globalhub-1-7 pull-request pipeline target_branch ā release-2.16 |
| 3 | openshift/release | main |
CI config for release-2.17, presubmit/postsubmit jobs |
| 4 | operator-bundle | release-1.8 |
Rename tekton pipelines globalhub-1-7 ā globalhub-1-8, update image tags |
| 5 | operator-catalog | main |
New release-1.8 catalog config, OCP 4.18-4.22 lifecycle |
| 6 | operator-catalog | release-1.8 |
Update pipeline and image mirror set |
| 7 | glo-grafana | release-1.8 |
Rename tekton pipelines globalhub-1-7 ā globalhub-1-8 |
| 8 | postgres_exporter | release-2.17 |
Rename tekton pipelines globalhub-1-7 ā globalhub-1-8 |
Branches Created: 5 branches
multicluster-global-hub: release-2.17operator-bundle: release-1.8operator-catalog: release-1.8glo-grafana: release-1.8postgres_exporter: release-2.17The orchestration script includes error handling:
RELEASE_BRANCH=release-2.17 ./.claude/skills/new-release/scripts/cut-release.sh all
CREATE_BRANCHES=true RELEASE_BRANCH=release-2.18 ./.claude/skills/new-release/scripts/cut-release.sh all
RELEASE_BRANCH=release-2.17 ./.claude/skills/new-release/scripts/cut-release.sh
# Then select: 3,4 (to update only bundle and catalog)
RELEASE_BRANCH=release-2.17 ./.claude/skills/new-release/scripts/cut-release.sh 1,2,3
RELEASE_BRANCH="release-2.17" GH_VERSION="v1.8.0" CREATE_BRANCHES=false ./scripts/04-catalog.sh
The skill provides clear progress indicators:
š Detecting latest release branch...
Latest release: release-2.16
Next release: release-2.17
š Version Information
================================================
ACM Release: release-2.17 (2.17)
Global Hub Version: v1.8.0
Bundle Branch: release-1.8
Catalog Branch: release-1.8
Supported OCP: 4.18 - 4.22
================================================
Mode: Update all repositories
š Starting Release Workflow
================================================
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š¦ [1/6] multicluster-global-hub
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Main repository with operator, manager, and agent
š Multicluster Global Hub Release Branch Creation
...
ā
multicluster-global-hub completed successfully
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š¦ [2/6] openshift/release
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
OpenShift CI configuration
...
ā
openshift/release completed successfully
... (continues for all 6 repositories)
================================================
š Release Workflow Summary
================================================
Version:
ACM: 2.17
Global Hub: v1.8.0
Results:
Total: 6
ā
Completed: 6
ā Failed: 0
================================================
š All selected repositories updated successfully!
š Next Steps:
1. Review and merge created PRs
2. Verify all release branches
3. Update konflux-release-data (manual)
After running the automated scripts:
Merge all created PRs
Update konflux-release-data repository
Verify release branches
This skill automates the following from RELEASE_CHECKLIST.md: