File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 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 : |
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ buildscript {
2727
2828 repositories {
2929 mavenLocal()
30- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
31- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
30+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
3231 mavenCentral()
3332 maven { url " https://plugins.gradle.org/m2/" }
3433 }
@@ -94,10 +93,11 @@ publishing {
9493 repositories {
9594 maven {
9695 name = " Snapshots" // optional target repository name
97- url = " https://central.sonatype.com/repository/maven-snapshots/"
98- credentials {
99- username " $System . env . SONATYPE_USERNAME "
100- password " $System . env . SONATYPE_PASSWORD "
96+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
97+ credentials(AwsCredentials ) {
98+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
99+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
100+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
101101 }
102102 }
103103 }
@@ -163,8 +163,7 @@ configurations.all {
163163
164164repositories {
165165 mavenLocal()
166- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
167- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
166+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
168167 mavenCentral()
169168 maven { url " https://plugins.gradle.org/m2/" }
170169}
You can’t perform that action at this time.
0 commit comments