From 2d1d629d004a9f1fd3685a6c9d6001a65bbb956d Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 13 Oct 2025 15:27:04 -0400 Subject: [PATCH] Onboarding new maven snapshots publishing to s3 Signed-off-by: Peter Zhu --- .github/workflows/publish-maven-snapshots.yml | 10 ++++++++-- CHANGELOG.md | 1 + build.gradle | 9 +++++---- gradle/run.gradle | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-maven-snapshots.yml b/.github/workflows/publish-maven-snapshots.yml index 279e6bac6a4d1..6b6158a354cdb 100644 --- a/.github/workflows/publish-maven-snapshots.yml +++ b/.github/workflows/publish-maven-snapshots.yml @@ -32,8 +32,14 @@ jobs: export-env: true env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username - SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password + MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo + MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v5 + with: + role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }} + aws-region: us-east-1 - name: Publish snapshots to maven run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e6b841e251c..72317f20f5ef9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Faster `terms` query creation for `keyword` field with index and docValues enabled ([#19350](https://github.com/opensearch-project/OpenSearch/pull/19350)) - Refactor to move prepareIndex and prepareDelete methods to Engine class ([#19551](https://github.com/opensearch-project/OpenSearch/pull/19551)) - Omit maxScoreCollector in SimpleTopDocsCollectorContext when concurrent segment search enabled ([#19584](https://github.com/opensearch-project/OpenSearch/pull/19584)) +- Onboarding new maven snapshots publishing to s3 ([#19619](https://github.com/opensearch-project/OpenSearch/pull/19619)) ### Fixed - Fix Allocation and Rebalance Constraints of WeightFunction are incorrectly reset ([#19012](https://github.com/opensearch-project/OpenSearch/pull/19012)) diff --git a/build.gradle b/build.gradle index 835386ea1979b..76c13a0456ffc 100644 --- a/build.gradle +++ b/build.gradle @@ -119,10 +119,11 @@ subprojects { } maven { name = 'Snapshots' - url = 'https://central.sonatype.com/repository/maven-snapshots/' - credentials { - username = System.getenv("SONATYPE_USERNAME") - password = System.getenv("SONATYPE_PASSWORD") + url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO") + credentials(AwsCredentials) { + accessKey = System.getenv("AWS_ACCESS_KEY_ID") + secretKey = System.getenv("AWS_SECRET_ACCESS_KEY") + sessionToken = System.getenv("AWS_SESSION_TOKEN") } } } diff --git a/gradle/run.gradle b/gradle/run.gradle index 3d89bdb10fefa..1b3c6f12bf514 100644 --- a/gradle/run.gradle +++ b/gradle/run.gradle @@ -67,7 +67,7 @@ testClusters { project.repositories { maven { name = 'OpenSearch Snapshots' - url = 'https://central.sonatype.com/repository/maven-snapshots/' + url = 'https://ci.opensearch.org/ci/dbc/snapshots/maven/' } } if (p.contains(':')) {