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 }
@@ -96,10 +95,11 @@ publishing {
9695 repositories {
9796 maven {
9897 name = " Snapshots" // optional target repository name
99- url = " https://central.sonatype.com/repository/maven-snapshots/"
100- credentials {
101- username " $System . env . SONATYPE_USERNAME "
102- password " $System . env . SONATYPE_PASSWORD "
98+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
99+ credentials(AwsCredentials ) {
100+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
101+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
102+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
103103 }
104104 }
105105 }
@@ -147,8 +147,7 @@ configurations.all {
147147
148148repositories {
149149 mavenLocal()
150- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
151- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
150+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
152151 mavenCentral()
153152 maven { url " https://plugins.gradle.org/m2/" }
154153}
You can’t perform that action at this time.
0 commit comments