spring-cloud-gcp-release
Skill555 starsChanged 7 months agoApache-2.0View on GitHub
Instructions for performing an automated, sequential release of Spring Cloud GCP.
- Deletes or force-pushes
- Commits and pushes
In this repositoryOne other file it gives its agents.
- backportSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. About 0 are common, 18 are distinctive, and 15 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Use this workflow to release any branch.
- Very specific: line 27
Create or read a .release_status.json file in the root of the repository to track progress.
- Very specific: line 41
Before updating libraries-bom or creating the release, check for and merge open dependency upgrade PRs from Renovate or Dependabot created …
- Very specific: line 62
If releasing
main: Verify that the gapic-generator-java-bom PR is merged. - Very specific: line 63
If releasing a maintenance branch: Verify that the libraries-bom PR is merged.
- Very specific: line 67
Search for open PRs with libraries-bom in the title:
- Very specific: line 75
Wait for cloud-java-bot to commit the auto-generated configurations.
- Very specific: line 87
Wait for release-please to create the Release PR on the target branch (re-running this query every 2 minutes, up to a maximum of 10 minutes …
- Very specific: line 96
Wait for release-please to create the SNAPSHOT bump PR on the target branch:
- Distinctive: line 118
Update Spring Initializr with the new Spring Cloud GCP version:
- Very specific: line 142
Create a branch update-gcp-<VERSION> from main:
- Distinctive: line 148
Commit the changes with sign-off (DCO requirement):
- Distinctive: line 158
After approval, push to your fork:
- Very specific: line 162
Create a PR targeting spring-io/start.spring.io's main branch:
- Very specific: line 168
Update the version reference in README.adoc:
- Very specific: line 170
Update the version strings in README.adoc with the newly released version (ensuring both the version URL path and the bracketed display …
- Very specific: line 172
Create a local branch docs-update-readme-<TIMESTAMP>.
- Distinctive: line 184
Create a PR targeting main.
- Very specific: line 192
Update the version string of the released maintenance branch in README.adoc (e.g.
- Very specific: line 205
Create a PR targeting main branch of GoogleCloudPlatform/spring-cloud-gcp.
- Distinctive: line 227
If a PR merge fails due to failing CI checks:
- Distinctive: line 241
Check if the failed test is a known flaky test (e.g.
- Distinctive: line 243
If the failure is determined to be a real bug (non-flaky), proceed directly to Step 4.
- Distinctive: line 246
If the test is deemed flaky, trigger a retry of the failed workflow run:
- Distinctive: line 250
Wait for the checks to complete.
- Distinctive: line 251
If the test passes after retry, record it for the final release report.
- Distinctive: line 252
If the check fails again, retry one more time (maximum 2 retries total).
- Distinctive: line 253
If it still fails after the second retry, proceed to step 4.
- Distinctive: line 258
Wait for the user's feedback and explicit approval of the proposed fix before proceeding.
- Distinctive: line 262
Run tests locally to confirm it passes.
- Distinctive: line 264
Commit your fix locally.
- Distinctive: line 267
After approval, push the branch and create a draft PR:
- Distinctive: line 280
Halt Condition: If any required check fails, or if 10 or more optional checks fail, halt the automated release, pause the pipeline, and …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Spring Cloud GCP Release Workflow
This skill guides the agent through the sequential release process for Spring Cloud GCP.
Prerequisites
- The GitHub CLI (
gh) must be installed and authenticated (gh auth status). - The authenticated user must have Admin or Maintainer access to the
GoogleCloudPlatform/spring-cloud-gcprepository. - Your git working directory must be clean.
Release Guidelines & Safety
- Merge Approvals: You do not need to request explicit user approval to merge automated bot PRs (such as the Release PR or the SNAPSHOT bump PR created by
release-please). You may approve and merge them directly once the required CI checks pass. - SNAPSHOT PR Merges: For post-release SNAPSHOT bump PRs, you can merge them as soon as all required status checks pass. You do not need to wait for optional checks to complete or pass.
- Code Change Approvals: You must get explicit user approval before pushing any code fixes or opening any new PRs that you authored (such as the Spring Initializr PR or README update PR).
Release Workflow
Use this workflow to release any branch. The user must explicitly specify which branch(es) to release (e.g. "perform a release for main, 7.x and 6.x branches").
Step 1: Initialize State
Create or read a .release_status.json file in the root of the repository to track progress. Note: This file is used purely for local status tracking across agent invocations and must NEVER be added, staged, or committed to git.
{
"branch": "<BRANCH>",
"version": "",
"step": 1,
"completed_steps": []
}[!IMPORTANT] No Cherry-Picking (Maintenance Branches): If the target branch is a maintenance branch (e.g.
7.x), do NOT perform any code fixes, backports, or cherry-picking of commits. All required fixes must be cherry-picked and merged to the target maintenance branch by the user before starting the release process.
Step 2: Merge Renovate/Dependabot Dependency Upgrade PRs
Before updating libraries-bom or creating the release, check for and merge open dependency upgrade PRs from Renovate or Dependabot created since the last release tag:
Note: If there are expected dependency upgrade PRs that are rate-limited or have not yet been opened by Renovate, locate the Renovate Dependency Dashboard (Issue #1705) on GitHub and check their respective checkboxes to manually trigger PR creation.
- Get the date of the latest release tag on the active branch:
LAST_RELEASE_DATE=$(git log -1 --format=%aI $(git describe --tags --abbrev=0)) - Query open PRs created by Renovate or Dependabot since
LAST_RELEASE_DATE:- If releasing
main: Excludelibraries-bom(which is handled separately in Step 3):gh pr list --base main --json number,title,author,createdAt --jq ".[] | select((.author.login == \"renovate\" or .author.login == \"dependabot\" or .author.isBot == true) and (.title | contains(\"libraries-bom\") | not) and .createdAt > \"$LAST_RELEASE_DATE\")" - If releasing a maintenance branch (e.g.,
7.x): Include all dependency upgrade PRs (includinglibraries-bom):gh pr list --base <BRANCH> --json number,title,author,createdAt --jq ".[] | select((.author.login == \"renovate\" or .author.login == \"dependabot\" or .author.isBot == true) and .createdAt > \"$LAST_RELEASE_DATE\")"
- If releasing
- For each found dependency upgrade PR, approve and squash-merge it:
gh pr review <PR_NUMBER> --approve gh pr merge <PR_NUMBER> --squash - Verify fallback:
- If releasing
main: Verify that thegapic-generator-java-bomPR is merged. If not open/merged, tick its box in the Renovate Dependency Dashboard (Issue #1705) to trigger it. - If releasing a maintenance branch: Verify that the
libraries-bomPR is merged. If not open/merged, tick its box in the Renovate Dependency Dashboard (Issue #1705) to trigger it.
- If releasing
Step 3: [Conditional] Merge libraries-bom PR (Main branch only)
This step is only executed if releasing the main branch. For maintenance branches, proceed directly to Step 4.
- Search for open PRs with
libraries-bomin the title:gh pr list --base main --search "libraries-bom in:title is:open" --json number - Trigger the "Generate Spring Auto-Configurations" workflow:
gh workflow run "Generate Spring Auto-Configurations" --ref main -f branch_name=<PR_BRANCH> -f forked_repo=<FORKED_REPO> - Wait for
cloud-java-botto commit the auto-generated configurations. Poll the PR's commits list (re-running this command every 2-3 minutes, up to a maximum of 10 minutes or 5 attempts) until a commit authored bycloud-java-bot(or containing "Regenerate auto-configurations") is present:- Timeout Fallback: If the commit is not found after 10 minutes, check the workflow run status (
gh run list --workflow "Generate Spring Auto-Configurations") to see if the run failed or got stuck, and report the diagnostic details to the user.
Once the commit is found, verify its files to ensure modifications are strictly withingh pr view <PR_NUMBER> --json commits --jq '.commits[] | {message: .message, author: .author.login}'spring-cloud-previews/and thatspring-cloud-previews/README.mdis updated:gh pr diff <PR_NUMBER> --name-only - Timeout Fallback: If the commit is not found after 10 minutes, check the workflow run status (
- Approve and squash-merge the
libraries-bomPR.
Step 4: Merge Release PR
- Wait for
release-pleaseto create the Release PR on the target branch (re-running this query every 2 minutes, up to a maximum of 10 minutes or 5 attempts):- Timeout Fallback: If the Release PR is not found after 10 minutes, check the "release-please" workflow run status (
gh run list --workflow "release-please") to see if the run failed or is stuck, and report the diagnostic details to the user.
gh pr list --base <BRANCH> --search "release in:title is:open author:app/release-please" --json number - Timeout Fallback: If the Release PR is not found after 10 minutes, check the "release-please" workflow run status (
- Detect the release version from the PR title (e.g.
8.0.4or7.4.10). Update.release_status.jsonwith this version. - Approve and squash-merge the Release PR.
Step 5: Merge Post-Release SNAPSHOT PR
- Wait for
release-pleaseto create the SNAPSHOT bump PR on the target branch:gh pr list --base <BRANCH> --search "SNAPSHOT in:title is:open author:app/release-please" --json number - Approve and merge it.
Step 6: Verify Publication
- Maven Central (MANDATORY): Poll the Maven Central repository URL until the new version is available (timeout 6 hours):
https://repo1.maven.org/maven2/com/google/cloud/spring-cloud-gcp/<VERSION>/Also check metadata to ensure it's indexed:https://repo1.maven.org/maven2/com/google/cloud/spring-cloud-gcp/maven-metadata.xml[!NOTE] Release Pipeline Delays: The Maven artifact release pipeline (executed by Kokoro/Louhi) can take longer than 2 hours to complete after the release tag is created. Continue polling Maven Central until the release process completes and the artifacts are indexed. [!TIP] Checking Kokoro/Sponge: The agent does not have direct access to search internal Google release dashboard runs (Louhi/Kokoro) due to corp SSO authentication. If the release remains unavailable after a long time, the user can manually retrieve the Sponge invocation ID from Louhi and provide it to the agent. The agent can then use
read_sponge_test_failure_logsandlist_sponge_artifactsto diagnose any internal build failures. If Maven Central verification fails or times out, stop the release and report failure. - Documentation (OPTIONAL): Poll the documentation URLs (timeout 2 hours). Do not halt the release if they are missing:
- Reference Docs:
https://googlecloudplatform.github.io/spring-cloud-gcp/<VERSION>/reference/html/index.html - Javadocs:
https://googleapis.dev/java/spring-cloud-gcp/<VERSION>/index.htmlNote the publication status (Exists / Missing) of both endpoints to include in the final report.
- Reference Docs:
Step 7: Create Spring Initializr PR
Update Spring Initializr with the new Spring Cloud GCP version:
[!IMPORTANT] Spring Contributor License Agreement (CLA): Spring projects require contributors to sign the Spring CLA. If the GitHub account you are using has never signed the Spring CLA, the CLA check run on the created PR will fail. The CLA bot will post a comment on the PR with a link; the user must manually open that link and sign the agreement on GitHub to unblock the PR checks.
- Fork
spring-io/start.spring.ioif not already forked:gh repo fork spring-io/start.spring.io --clone=false - Clean up any pre-existing clone and perform a fresh clone of your fork (using
temp-start.spring.ioas directory):rm -rf temp-start.spring.io gh repo clone $(gh api user --jq .login)/start.spring.io temp-start.spring.io - Navigate to the clone, link the upstream repository, fetch, and hard-reset your
mainbranch to match the latest upstream state to prevent unrelated diffs:cd temp-start.spring.io git remote add upstream https://github.com/spring-io/start.spring.io.git || true git fetch upstream main git checkout main git reset --hard upstream/main - Sync your fork with the latest upstream state:
gh repo sync $(gh api user --jq .login)/start.spring.io --source spring-io/start.spring.io - Create a branch
update-gcp-<VERSION>frommain:git checkout -b update-gcp-<VERSION> - Locate
start-site/src/main/resources/application.ymland find thespring-cloud-gcpblock underboms. - Identify the mapping entry corresponding to the major version being released (e.g. if releasing
7.4.10, locate the mapping withversion: 7.x.x). Use thereplace_file_contenttool to update itsversionstring (and optionallycompatibilityRangeupper bound if updating compatibility). - Commit the changes with sign-off (DCO requirement):
git commit -s -m "Upgrade to Spring Cloud GCP <VERSION>" - SAFETY GATE: Generate the git diff (
git diff HEAD~1) and include it in your prompt to the user when asking for approval: "I have prepared the changes for spring-io/start.spring.io. Here is the diff:diff* *<INSERT_DIFF_HERE>* *Do you approve pushing this change to your fork? (Reply 'Yes, proceed')" - After approval, push to your fork:
git push -u origin update-gcp-<VERSION> - Create a PR targeting
spring-io/start.spring.io'smainbranch:gh pr create --repo spring-io/start.spring.io --head $(gh api user --jq .login):update-gcp-<VERSION> --title "Upgrade to Spring Cloud GCP <VERSION>" --body "Automated PR to update Spring Cloud GCP."
Step 8: Update README.adoc
Update the version reference in README.adoc:
- If releasing
mainbranch:- Update the version strings in
README.adocwith the newly released version (ensuring both the version URL path and the bracketed display label text are updated).- Compatibility Matrix Check: To determine if the release adds or upgrades Spring Boot / Spring Cloud version support, compare the
spring-boot-dependencies.versionandspring-cloud-dependencies.versionproperties in the rootpom.xmlagainst the current compatibility table. If the release updates a major or minor version line (e.g.4.0.xto4.1.x), update the compatibility table in bothREADME.adocanddocs/src/main/asciidoc/getting-started.adoc(ensuring no spaces between link text brackets, e.g....Release-Notes[4.0.x], ...Release-Notes[4.1.x]). If only a patch version was updated (e.g.4.0.1to4.0.2), no compatibility table change is required.
- Compatibility Matrix Check: To determine if the release adds or upgrades Spring Boot / Spring Cloud version support, compare the
- Create a local branch
docs-update-readme-<TIMESTAMP>. - Commit the change:
git commit -m "docs: update README for release <VERSION>" - SAFETY GATE: Generate the git diff (
git diff HEAD~1) and include it in your prompt to the user when asking for approval: "I have prepared the README update. Here is the diff:diff* *<INSERT_DIFF_HERE>* *Do you approve pushing this change to origin? (Reply 'Yes, proceed')" - Push to
origin(your fork ofspring-cloud-gcp). - Create a PR targeting
main.
- Update the version strings in
- If releasing a maintenance branch (e.g.,
7.x):- Checkout the
mainbranch and pull latest changes:git checkout main git pull upstream main - Create a local branch
docs-update-readme-<VERSION>. - Update the version string of the released maintenance branch in
README.adoc(e.g. update7.4.8to7.4.10in both the links list URL path and bracketed display label text).- Compatibility Matrix Check: To determine if the release adds or upgrades Spring Boot / Spring Cloud version support, compare the
spring-boot-dependencies.versionandspring-cloud-dependencies.versionproperties in the rootpom.xmlagainst the current compatibility table. If the release updates a major or minor version line (e.g.4.0.xto4.1.x), update the compatibility table in bothREADME.adocanddocs/src/main/asciidoc/getting-started.adoc. If only a patch version was updated (e.g.4.0.1to4.0.2), no compatibility table change is required.
- Compatibility Matrix Check: To determine if the release adds or upgrades Spring Boot / Spring Cloud version support, compare the
- Commit the change:
git commit -m "docs: update README for release <VERSION>" - SAFETY GATE: Generate the git diff (
git diff HEAD~1) and ask for approval: "I have prepared the README update. Here is the diff:diff* *<INSERT_DIFF_HERE>* *Do you approve pushing this change to origin? (Reply 'Yes, proceed')" - Push to
origin(your fork ofspring-cloud-gcp). - Create a PR targeting
mainbranch ofGoogleCloudPlatform/spring-cloud-gcp.
- Checkout the
Step 9: Final Report
Send a message to the user summarizing the release, including:
- A summary statement (e.g. "Release of Spring Cloud GCP
<VERSION>is complete"). - A list of any flaky test failures encountered and recovered during the release process (specifying test names and run URLs).
- Links to all merged PRs:
- Renovate/Dependabot dependency upgrade PRs (e.g.
libraries-bom,gapic-generator-java-bomPRs) - Release PR
- Post-release SNAPSHOT PR
- Renovate/Dependabot dependency upgrade PRs (e.g.
- Links to new PRs created:
[ACTION REQUIRED]Spring Initializr PR (requires review and merge)[ACTION REQUIRED]README update PR (requires review and merge)
- Links to publications:
- Maven Central Artifact
- Reference Documentation (If missing, flag as
[ACTION REQUIRED] Reference Documentation is missing) - Javadocs (If missing, flag as
[ACTION REQUIRED] Javadocs are missing)
Handling CI Failures (Shared)
If a PR merge fails due to failing CI checks:
- Investigate the Failure:
- Retrieve the list of checks for the PR:
gh pr checks <PR_NUMBER> - Find the failing check and retrieve its run log using the GitHub CLI or by navigating to the URL:
gh run view <RUN_ID> --log - Determine the root cause (e.g., compile error, test assertion failure, transient connection error).
- Retrieve the list of checks for the PR:
- Determine if Flaky:
- Check if the failed test is a known flaky test (e.g. search repository issues for the test name, or check memory files for flaky test patterns).
- Common indicators of flakiness: transient network timeout, integration test database cleanup failure, or resource exhaustions.
- If the failure is determined to be a real bug (non-flaky), proceed directly to Step 4.
- Flaky Test Recovery (Retry Up to 2 Times):
- If the test is deemed flaky, trigger a retry of the failed workflow run:
gh run rerun <RUN_ID> --failed - Wait for the checks to complete.
- If the test passes after retry, record it for the final release report.
- If the check fails again, retry one more time (maximum 2 retries total).
- If it still fails after the second retry, proceed to step 4.
- If the test is deemed flaky, trigger a retry of the failed workflow run:
- Create Code Fix (For Real Bugs or Persistent Failures):
- Pause the release pipeline.
- Present a diagnostic report to the user explaining the failure root cause, and propose a code fix strategy.
- Wait for the user's feedback and explicit approval of the proposed fix before proceeding.
- Once aligned, create a local branch
fix/<issue-name>off the branch you are releasing. - Implement the fix locally.
- Verify the fix:
- Run tests locally to confirm it passes.
- Format all modified Java files:
mvn com.spotify.fmt:fmt-maven-plugin:format.
- Commit your fix locally.
- SAFETY GATE: Output a standalone push confirmation request to the user:
"I am ready to push the fix to origin/fix/<issue-name> (force-push: no) with the commit message: '<commit_message>'. Do you approve this remote push? (Please reply with 'Yes, proceed')". - After approval, push the branch and create a draft PR:
git push -u origin fix/<issue-name> gh pr create --draft --title "Fix: <description>" --body "Automated PR to fix CI failure during release." - Provide the PR link to the user for review.
- Once the PR is approved by the user and merged, pull the changes locally, check out the release branch, and resume the release steps.
- Permissive Merge Policy (Required vs Optional Checks):
- Evaluate both required and optional status checks for the release PRs.
- Merge Condition: You may proceed to merge a PR if:
- All required status checks pass (verified by
gh pr checks <PR_NUMBER> --required). - The total count of failing optional (non-required) checks is less than 10 (e.g. SonarCloud or flaky database checks).
- All required status checks pass (verified by
- Halt Condition: If any required check fails, or if 10 or more optional checks fail, halt the automated release, pause the pipeline, and alert the release manager for manual review.
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.

