Skip to content

Commit 84cc00c

Browse files
Onboarding new maven snapshots publishing to s3 (#19619)
Signed-off-by: Peter Zhu <[email protected]>
1 parent 5468936 commit 84cc00c

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.github/workflows/publish-maven-snapshots.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ jobs:
3232
export-env: true
3333
env:
3434
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
35-
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
36-
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
35+
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
36+
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
37+
38+
- name: Configure AWS credentials
39+
uses: aws-actions/configure-aws-credentials@v5
40+
with:
41+
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
42+
aws-region: us-east-1
3743

3844
- name: Publish snapshots to maven
3945
run: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1717
- Faster `terms` query creation for `keyword` field with index and docValues enabled ([#19350](https://github.com/opensearch-project/OpenSearch/pull/19350))
1818
- Refactor to move prepareIndex and prepareDelete methods to Engine class ([#19551](https://github.com/opensearch-project/OpenSearch/pull/19551))
1919
- Omit maxScoreCollector in SimpleTopDocsCollectorContext when concurrent segment search enabled ([#19584](https://github.com/opensearch-project/OpenSearch/pull/19584))
20+
- Onboarding new maven snapshots publishing to s3 ([#19619](https://github.com/opensearch-project/OpenSearch/pull/19619))
2021
- Remove MultiCollectorWrapper and use MultiCollector in Lucene instead ([#19595](https://github.com/opensearch-project/OpenSearch/pull/19595))
2122

2223
### Fixed

build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ subprojects {
119119
}
120120
maven {
121121
name = 'Snapshots'
122-
url = 'https://central.sonatype.com/repository/maven-snapshots/'
123-
credentials {
124-
username = System.getenv("SONATYPE_USERNAME")
125-
password = System.getenv("SONATYPE_PASSWORD")
122+
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
123+
credentials(AwsCredentials) {
124+
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
125+
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
126+
sessionToken = System.getenv("AWS_SESSION_TOKEN")
126127
}
127128
}
128129
}

gradle/run.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ testClusters {
6767
project.repositories {
6868
maven {
6969
name = 'OpenSearch Snapshots'
70-
url = 'https://central.sonatype.com/repository/maven-snapshots/'
70+
url = 'https://ci.opensearch.org/ci/dbc/snapshots/maven/'
7171
}
7272
}
7373
if (p.contains(':')) {

0 commit comments

Comments
 (0)