Skip to content

ci: migrate Maven Central release workflow to OSS Exit Gate - #1521

Open
alonsopf89 wants to merge 1 commit into
google:masterfrom
alonsopf89:oss-exit-gate-migration
Open

alonsopf89 wants to merge 1 commit into
google:masterfrom
alonsopf89:oss-exit-gate-migration

Conversation

@alonsopf89

Copy link
Copy Markdown

Summary

Configures Maven Central release staging for google/google-java-format through Google's OSS Exit Gate (google-java-fmt/mavencentral).

Key Changes

  • Artifact Registry Staging Target: Stages release artifacts to us-maven.pkg.dev/oss-exit-gate-prod/google-java-fmt--mavencentral via the oss-exit-gate publishing profile/repository (leaving normal builds, unit tests, and snapshot workflows unaffected).
  • Preemptive Staging Cleanup & Release Manifest: Before publishing a new release, stale packages in google-java-fmt--mavencentral should be cleaned via gcloud artifacts packages list/delete, followed by uploading manifest.json ({"publish_all": true}) to gs://oss-exit-gate-prod-projects-bucket/google-java-fmt/mavencentral/manifests/ to trigger OSS Exit Gate verification and Maven Central publication:
    # 1. Clean up stale releases from staging repo
    packages=$(gcloud artifacts packages list \
        --project="oss-exit-gate-prod" \
        --location="us" \
        --repository="google-java-fmt--mavencentral" \
        --format="value(name)" 2>/dev/null)
    echo "${packages}" | xargs -r -I {} sh -c '
        gcloud artifacts packages delete "{}" \
            --project="oss-exit-gate-prod" \
            --location="us" \
            --repository="google-java-fmt--mavencentral" \
            --quiet
    '
    
    # 2. Stage signed artifacts & upload release manifest
    mvn deploy -P sonatype-oss-release,oss-exit-gate
    echo '{"publish_all": true}' > /tmp/manifest.json
    gcloud storage cp /tmp/manifest.json \
        "gs://oss-exit-gate-prod-projects-bucket/google-java-fmt/mavencentral/manifests/manifest-$(date +%s).json"
  • Verification: OSS Exit Gate resources (google-java-fmt--mavencentral) are provisioned and end-to-end Artifact Registry + GCS manifest smoke testing has been verified (HTTP 201 + rc=0).

@google-cla

google-cla Bot commented Nov 5, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@alonsopf89
alonsopf89 force-pushed the oss-exit-gate-migration branch from 63fb733 to 0d17410 Compare November 5, 2026 17:09
@alonsopf89
alonsopf89 force-pushed the oss-exit-gate-migration branch from 1b2d95d to 1f71b30 Compare November 6, 2026 19:17
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.

1 participant