Repository navigation
fix(ci): gate snapshot deploy and release on successful build - #4055
Merged
Merged
Conversation
kthoms
force-pushed
the
ci/integration-build-deploy-gating
branch
from
November 6, 2026 14:13
af19b79 to
9bbe6bf
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Maven invocation inherits deploy.skip=true, causing snapshot uploads to be skipped while the deployment workflow reports success.
1 open issue
What changed in this PR
This PR tightens the Integration Build workflow’s publishing gates and reuses staged build artifacts for snapshot deployment instead of rebuilding the project.
Changes:
- Require successful upstream jobs before snapshot deployment, release, and post-release notification.
- Add parallel deployment of staged snapshot artifacts, respecting
dry_runand preserving metadata until release preparation. - Build the Docker dispatch payload with
jqto correctly include the version.
| File | Description |
|---|---|
.github/workflows/integration-build.yml |
Adds publishing gates, staged-artifact deployment, and corrected Docker payload generation. |
.github/scripts/deploy-staged-snapshots.sh |
Reads staged Maven metadata and deploys snapshot artifacts in parallel. |
Review effort: Balanced
Deploy Snapshots, Release and Post-Release ran even when the build
failed, because their conditions only checked always() && !cancelled().
Post-Release then notified the Docker repository with an empty version.
- Deploy Snapshots requires Build, Integration Tests and Documentation
to succeed
- Deploy Snapshots no longer rebuilds: it deploys the artifacts the
Java 17 build staged in target/staging-deploy via deploy:deploy-file
(new script .github/scripts/deploy-staged-snapshots.sh)
- maven-metadata files are kept in the staged repo and stripped in the
Release job before JReleaser
- Release requires Build and Documentation to succeed and Integration
Tests to succeed or be skipped; Post-Release requires Release
- Snapshot deploy honours dry_run; unused GPG import removed; server id
central-snapshots avoids the clash with the pom's central repository
- Docker dispatch payload is built with jq, so the version is expanded
instead of being sent as a literal ${NEEDS_BUILD_OUTPUTS_VERSION}
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- pass -Ddeploy.skip=false: the root pom sets deploy.skip=true, which turned every deploy-file call into a silent no-op - deploy with server id central again: since #4058 the generated settings.xml allows https://central.sonatype.com as repository origin for that id, so a separate central-snapshots id is not needed - address Sonar findings in deploy-staged-snapshots.sh Co-Authored-By: Claude Opus 5.5 <[email protected]>
kthoms
force-pushed
the
ci/integration-build-deploy-gating
branch
from
November 6, 2026 21:59
9bbe6bf to
fe620ac
Compare
kthoms
added a commit
that referenced
this pull request
Nov 6, 2026
- Deploy Snapshots, Release and Post-Release ran even when the build
failed, because their conditions only checked always() && !cancelled().
Post-Release then notified the Docker repository with an empty version.
- Deploy Snapshots requires Build, Integration Tests and Documentation
to succeed
- Deploy Snapshots no longer rebuilds: it deploys the artifacts the
Java 17 build staged in target/staging-deploy via deploy:deploy-file
(new script .github/scripts/deploy-staged-snapshots.sh)
- maven-metadata files are kept in the staged repo and stripped in the
Release job before JReleaser
- Release requires Build and Documentation to succeed and Integration
Tests to succeed or be skipped; Post-Release requires Release
- Snapshot deploy honours dry_run; unused GPG import removed; server id
central-snapshots avoids the clash with the pom's central repository
- Docker dispatch payload is built with jq, so the version is expanded
instead of being sent as a literal ${NEEDS_BUILD_OUTPUTS_VERSION}
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit c892b1f)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Problem
In the Integration Build workflow, Deploy Snapshots, Release and Post-Release ran even when Build failed (e.g. runs 42199441173, 42006883540, 41811628014). Their
if:only checkedalways() && !cancelled()and never the results of the jobs they depend on. Post-Release then notified operaton-docker, and that payload had a quoting bug: the version was sent as the literal string${NEEDS_BUILD_OUTPUTS_VERSION}.Deploy Snapshots also ran a full
./mvnw deployand rebuilt the whole project, even though the build job had already produced every artifact.Changes
needs).build-artifacts-17bundle and deploys the already-stagedtarget/staging-deploytohttps://central.sonatype.com/repository/maven-snapshots/, using the new.github/scripts/deploy-staged-snapshots.sh. The script reads each version'smaven-metadata.xmland makes onedeploy:deploy-filecall per artifact (-SNAPSHOTversions only, 4 at a time).dry_run.central, which since chore(ci): allow Central origin for snapshot deploy credentials #4058 listshttps://central.sonatype.comunderrepositoryOrigins, so Maven 3.10 sends the credentials there.-Ddeploy.skip=false. Without it, the root pom'sdeploy.skip=truemade everydeploy-filecall a silent no-op.maven-metadata.*. The Release job strips them after unpacking, before JReleaser, so JReleaser gets the same input as before.jq, so the version is filled in and quoted correctly.Verification
settings.xml(idcentral+repositoryOrigins), jar, pom, sources and snapshot metadata were all uploaded. WithoutrepositoryOrigins, the upload fails and the script exits with an error.shellcheck(script) andzizmorare clean.actionlintreports nothing new, and the SC2016 warning on the Docker payload is gone.workflow_dispatchnightly run is the first real test.Notes
integration_tests=falsenow blocks the snapshot deploy, because Integration Tests are required to succeed.🤖 Generated with Claude Code