Add Claude Code plugins for OpenShift release branching automation
Add comprehensive Claude Code plugins to automate OpenShift release branching workflows.
Features
- 2 slash commands:
/branching-dayand/post-branching - 39 automation skills (15 branching-day, 19 post-branching, 5 common)
- Automatic version detection from periodic-prow-auto-config-brancher
- Gangway integration for job triggering with optional polling
- Image stream tagging/verification with automatic retry
- Fail-fast architecture with separate verify skills for recovery
Workflow Coverage
Branching Day: 10 steps → 3 PRs (config-brancher, tide-config, image-mirroring) Post-Branching: 10 steps → 5 PRs (jira, merge-blockers, fast-forward, ci-configs, auto-config-brancher)
🤖 Generated with Claude Code
Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.
For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.
This repository is configured in: automatic mode
Walkthrough
Introduces a comprehensive OpenShift release branching automation framework comprising a plugin manifest, 40+ shell scripts organized into branching-day, post-branching, and common skill categories, and orchestration documentation for two workflows: branching-day and post-branching.
Changes
| Cohort / File(s) | Summary |
|---|---|
Plugin Manifest & Configurationplugin.json |
Declares plugin metadata, two top-level commands (branching-day, post-branching), extensive skill registry with script paths, and configuration parameters for RELEASE_REPO and CI_TOOLS_REPO. |
Branching Day - Commit Scriptsbranching-day/commit-config-brancher-pr.sh, branching-day/commit-tide-config-pr.sh, branching-day/commit-image-mirroring-pr.sh |
Automate git staging and committing of configuration changes for config-brancher, tide-config, and image-mirroring workflows with branch validation and conditional file handling. |
Branching Day - Run Orchestration Scriptsbranching-day/run-config-brancher.sh, branching-day/run-tide-config-manager.sh |
Wrap external tools (config-brancher, tide-config-manager) with argument validation, directory resolution, and success messaging. |
Branching Day - Update Configuration Scriptsbranching-day/update-etcd-config.sh, branching-day/update-image-mirroring.sh, branching-day/update-infra-periodics.sh, branching-day/update-tide-and-infra-jobs.sh |
Perform targeted YAML edits and sed-based substitutions to update release versions, branches, and flags in multiple configuration files. |
Branching Day - Verification Scriptsbranching-day/verify-config-brancher.sh, branching-day/verify-etcd-config.sh, branching-day/verify-infra-periodics.sh, branching-day/verify-tide-and-infra-jobs.sh, branching-day/verify-tide-config-manager.sh |
Validate state changes after each branching step (config existence, YAML field updates, commit counts) with exit codes and detailed error reporting. |
Common Skills - Build & Repositorycommon/build-branching-tooling.sh, common/create-branch-from-master.sh |
Build required binaries from source via make, and initialize feature branches with remote synchronization and optional hard reset. |
Common Skills - Release Readinesscommon/get-current-release.sh, common/trigger-periodic-jobs.sh |
Determine branching eligibility by querying nightly release status, and trigger CI periodic jobs with optional polling for completion. |
Post-Branching - Commit Scriptspost-branching/commit-auto-config-brancher-pr.sh, post-branching/commit-fast-forward-pr.sh, post-branching/commit-image-mirroring-x-y-plus-2-pr.sh, post-branching/commit-jira-validation-pr.sh, post-branching/commit-merge-blockers-pr.sh |
Stage and commit post-branching configuration updates with branch validation and conditional change detection. |
Post-Branching - Complex Generationpost-branching/create-config-jobs-x-y-plus-2.sh |
Multi-step orchestration generating CI configs, mirroring openshift-priv scopes, applying Python-based job filters, and committing carryover jobs for next release. |
Post-Branching - Image & Mirror Operationspost-branching/mirror-imagestreams-to-quay.sh, post-branching/tag-imagestreams.sh |
Mirror container image streams to external registry with retry logic, and seed OpenShift ImageStream tag mappings via oc operations. |
Post-Branching - Update Scriptspost-branching/update-auto-config-brancher-x-y-plus-2.sh, post-branching/update-fast-forward-job.sh, post-branching/update-image-mirroring-x-y-plus-2.sh, post-branching/update-jira-validation-post-branching.sh, post-branching/update-merge-blockers-job.sh |
Apply version-specific updates to infra-periodics.yaml, image-mirroring configs, and Jira validation YAML with computed release versions and targeted sed/awk edits. |
Post-Branching - Verification Scriptspost-branching/verify-auto-config-brancher.sh, post-branching/verify-config-jobs-x-y-plus-2.sh, post-branching/verify-fast-forward-job.sh, post-branching/verify-image-mirroring-x-y-plus-2.sh, post-branching/verify-imagestream-tags.sh, post-branching/verify-jira-validation.sh, post-branching/verify-merge-blockers-job.sh |
Validate post-branching state changes across CI configs, jobs, image mirroring, and Jira configurations with specific field and entry existence checks. |
Orchestration Documentation.claude/commands/branching-day.md, .claude/commands/post-branching.md |
Define two comprehensive automation workflows with step-by-step skill invocation, error handling recovery paths, common failure scenarios, and manual remediation guidance. |
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~60–75 minutes
- Primary concern: Correctness of 40+ sed/awk patterns across update and commit scripts—each performs precise YAML field substitutions or multi-line edits within named YAML blocks; errors here would silently corrupt configuration or cause CI failures.
-
Secondary concerns:
- Consistency of error handling, argument validation, and exit codes across all shell scripts
- Git operations safety: branch checking, staging, committing, and commit counting logic
- Interdependencies and state assumptions: each script expects outputs or file states from prior steps; orchestration flow in markdown must align with actual script behavior
- Bash safety practices: proper quoting, variable expansion, set -euo pipefail enforcement
-
Specific files requiring extra attention:
-
post-branching/create-config-jobs-x-y-plus-2.sh—most complex, multi-stage orchestration with tool installation, config generation, Python filter creation, and iterative commits -
post-branching/update-jira-validation-post-branching.shandpost-branching/update-image-mirroring-x-y-plus-2.sh—complex multi-stanza YAML insertion via awk with temporary file handling - All
verify-*scripts—cumulative failure tracking logic and multi-check sequencing -
.claude/commands/branching-day.mdand.claude/commands/post-branching.md—verify orchestration steps match actual skill names, argument passing, and error recovery guidance is actionable
-
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Comment @coderabbitai help to get the list of available commands and usage tips.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Prucek
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Prucek]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Scheduling required tests: /test e2e
Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test integration-optional-test
@Prucek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| ci/prow/breaking-changes | ed9fc13bfec9be120fcbaea19e05eff869320adb | link | false | /test breaking-changes |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.