Skip to content

ci: skip central-publishing upload during internal CI validation builds#405

Open
AnshulPatni wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
AnshulPatni:fix-build-central-publishing-skip
Open

ci: skip central-publishing upload during internal CI validation builds#405
AnshulPatni wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
AnshulPatni:fix-build-central-publishing-skip

Conversation

@AnshulPatni

Copy link
Copy Markdown
Contributor

During internal CI validation builds (.kokoro/build.sh), mvn clean deploy -P sonatype-oss-release failed during the deployment phase:
Could not transfer artifact ... from/to sonatype-central-portal (https://central.sonatype.com/repository/maven-snapshots/): authentication failed ... status: 401 Unauthorized

While .kokoro/build.sh specifies -DaltDeploymentRepository to stage validation artifacts in internal testing registries, central-publishing-maven-plugin (<extensions>true</extensions>) overrides default Maven deployment behavior and attempts an authenticated upload to public Sonatype Central.

By adding -DskipPublishing=true and -Dcentral.skipPublishing=true to .kokoro/build.sh (following standard open-source library CI patterns), we allow internal validation deployments (altDeploymentRepository) to complete cleanly without triggering public Sonatype authentication.

…ation builds

Change-Id: I945fa5a4a260ac8837f134c97e7fb4e2799a81b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants