Skip to content

Commit d71ff50

Browse files
Onboarding new maven snapshots publishing to s3 (jVector)
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent 96909d7 commit d71ff50

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/maven-publish.yml

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

3642
- name: publish snapshots to maven
3743
run: |

DEVELOPER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ In case remote cluster is secured it's possible to pass username and password wi
247247
```
248248

249249
### Install jVector KNN within your existing OpenSearch cluster installation
250-
The jvector plugin can be downloaded from [here](https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/opensearch/knn/opensearch-jvector/3.0.0.0-SNAPSHOT/)
250+
The jvector plugin can be downloaded from [here](https://ci.opensearch.org/ci/dbc/snapshots/maven/org/opensearch/knn/opensearch-jvector/3.0.0.4-SNAPSHOT/)
251251
```bash
252252
# Go into the OpenSearch directory
253253
cd opensearch

build-tools/repositories.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
repositories {
77
mavenLocal()
8-
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
9-
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
8+
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
109
mavenCentral()
1110
maven { url "https://plugins.gradle.org/m2/" }
1211
}

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ buildscript {
3737
// This isn't applying from repositories.gradle so repeating git diff it here
3838
repositories {
3939
mavenLocal()
40-
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
41-
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
40+
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
4241
mavenCentral()
4342
maven { url "https://plugins.gradle.org/m2/" }
4443
}
@@ -204,10 +203,11 @@ publishing {
204203
repositories {
205204
maven {
206205
name = "Snapshots"
207-
url = "https://central.sonatype.com/repository/maven-snapshots/"
208-
credentials {
209-
username System.getenv("SONATYPE_USERNAME")
210-
password System.getenv("SONATYPE_PASSWORD")
206+
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
207+
credentials(AwsCredentials) {
208+
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
209+
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
210+
sessionToken = System.getenv("AWS_SESSION_TOKEN")
211211
}
212212
}
213213
maven {

0 commit comments

Comments
 (0)