Skip to content

Commit 09411a6

Browse files
Onboarding new maven snapshots publishing to s3
Signed-off-by: Peter Zhu <[email protected]>
1 parent 089fad3 commit 09411a6

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- maven-snapshots-s3
89
- '[0-9]+.[0-9]+'
910
- '[0-9]+.x'
1011

@@ -32,8 +33,14 @@ jobs:
3233
export-env: true
3334
env:
3435
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
36+
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
37+
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
38+
39+
- name: Configure AWS credentials
40+
uses: aws-actions/configure-aws-credentials@v5
41+
with:
42+
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
43+
aws-region: us-east-1
3744

3845
- name: Publish snapshots to maven
3946
run: |

CHANGELOG.md

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

1718
### Fixed
1819
- Fix Allocation and Rebalance Constraints of WeightFunction are incorrectly reset ([#19012](https://github.com/opensearch-project/OpenSearch/pull/19012))

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)