File tree Expand file tree Collapse file tree 7 files changed +31
-24
lines changed Expand file tree Collapse file tree 7 files changed +31
-24
lines changed Original file line number Diff line number Diff line change 3333 export-env : true
3434 env :
3535 OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
36- SONATYPE_USERNAME : op://opensearch-infra-secrets/maven-central-portal-credentials/username
37- 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
3844
3945 - name : publish snapshots to maven
4046 run : |
Original file line number Diff line number Diff line change 55
66repositories {
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://oss.sonatype.org/content/repositories/snapshots/' }
1211 maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ buildscript {
3030
3131 repositories {
3232 mavenLocal()
33- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
34- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
33+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
3534 mavenCentral()
3635 maven { url " https://plugins.gradle.org/m2/" }
3736 maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
Original file line number Diff line number Diff line change @@ -81,10 +81,11 @@ publishing {
8181 }
8282 maven {
8383 name = " Snapshots"
84- url = " https://central.sonatype.com/repository/maven-snapshots/"
85- credentials {
86- username " $System . env . SONATYPE_USERNAME "
87- password " $System . env . SONATYPE_PASSWORD "
84+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
85+ credentials(AwsCredentials ) {
86+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
87+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
88+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
8889 }
8990 }
9091 }
Original file line number Diff line number Diff line change @@ -121,10 +121,11 @@ publishing {
121121 }
122122 maven {
123123 name = " Snapshots" // optional target repository name
124- url = " https://central.sonatype.com/repository/maven-snapshots/"
125- credentials {
126- username " $System . env . SONATYPE_USERNAME "
127- password " $System . env . SONATYPE_PASSWORD "
124+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
125+ credentials(AwsCredentials ) {
126+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
127+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
128+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
128129 }
129130 }
130131 }
Original file line number Diff line number Diff line change @@ -119,10 +119,11 @@ publishing {
119119 mavenCentral()
120120 maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
121121 name = " Snapshots"
122- url = " https://central.sonatype.com/repository/maven-snapshots/"
123- credentials {
124- username " $System . env . SONATYPE_USERNAME "
125- password " $System . env . 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 }
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ apply plugin: 'opensearch.java'
1818repositories {
1919 mavenLocal()
2020 mavenCentral()
21- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
22- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
21+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
2322}
2423
2524ext {
@@ -97,10 +96,11 @@ publishing {
9796 }
9897 maven {
9998 name = " Snapshots" // optional target repository name
100- url = " https://central.sonatype.com/repository/maven-snapshots/"
101- credentials {
102- username " $System . env . SONATYPE_USERNAME "
103- password " $System . env . SONATYPE_PASSWORD "
99+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
100+ credentials(AwsCredentials ) {
101+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
102+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
103+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
104104 }
105105 }
106106 }
You can’t perform that action at this time.
0 commit comments