Skip to content

Commit eed569d

Browse files
committed
Attempt to publish to S3 again
Signed-off-by: Simeon Widdis <[email protected]>
1 parent 05dd1a4 commit eed569d

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 2.*
1010

1111
env:
12-
SNAPSHOT_REPO_URL: https://central.sonatype.com/repository/maven-snapshots/
12+
SNAPSHOT_REPO_URL: https://ci.opensearch.org/ci/dbc/snapshots/maven/
1313

1414
jobs:
1515
publish-unified-query-modules:
@@ -35,9 +35,13 @@ jobs:
3535
export-env: true
3636
env:
3737
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
38-
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
39-
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
40-
41-
- name: publish unified query modules to maven
38+
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
39+
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role
40+
- name: Configure AWS credentials
41+
uses: aws-actions/configure-aws-credentials@v5
42+
with:
43+
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
44+
aws-region: us-east-1
45+
- name: publish snapshots to maven
4246
run: |
4347
./gradlew publishUnifiedQueryPublicationToSnapshotsRepository

build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,12 @@ subprojects {
197197
repositories {
198198
maven {
199199
name = "Snapshots"
200-
url = "https://central.sonatype.com/repository/maven-snapshots/"
201-
credentials {
202-
username System.getenv("SONATYPE_USERNAME")
203-
password System.getenv("SONATYPE_PASSWORD")
200+
url = "https://ci.opensearch.org/ci/dbc/snapshots/maven/"
201+
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
202+
credentials(AwsCredentials) {
203+
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
204+
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
205+
sessionToken = System.getenv("AWS_SESSION_TOKEN")
204206
}
205207
}
206208
}

0 commit comments

Comments
 (0)