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 @@ -31,8 +31,7 @@ buildscript {
3131
3232 repositories {
3333 mavenLocal()
34- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
35- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
34+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
3635 mavenCentral()
3736 maven { url " https://plugins.gradle.org/m2/" }
3837 maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
Original file line number Diff line number Diff line change @@ -72,10 +72,11 @@ publishing {
7272 }
7373 maven {
7474 name = " Snapshots"
75- url = " https://central.sonatype.com/repository/maven-snapshots/"
76- credentials {
77- username " $System . env . SONATYPE_USERNAME "
78- password " $System . env . SONATYPE_PASSWORD "
75+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
76+ credentials(AwsCredentials ) {
77+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
78+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
79+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
7980 }
8081 }
8182 }
Original file line number Diff line number Diff line change @@ -113,10 +113,11 @@ publishing {
113113 }
114114 maven {
115115 name = " Snapshots" // optional target repository name
116- url = " https://central.sonatype.com/repository/maven-snapshots/"
117- credentials {
118- username " $System . env . SONATYPE_USERNAME "
119- password " $System . env . SONATYPE_PASSWORD "
116+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
117+ credentials(AwsCredentials ) {
118+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
119+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
120+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
120121 }
121122 }
122123 }
Original file line number Diff line number Diff line change @@ -163,10 +163,11 @@ publishing {
163163 mavenCentral()
164164 maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
165165 name = " Snapshots"
166- url = " https://central.sonatype.com/repository/maven-snapshots/"
167- credentials {
168- username " $System . env . SONATYPE_USERNAME "
169- password " $System . env . SONATYPE_PASSWORD "
166+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
167+ credentials(AwsCredentials ) {
168+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
169+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
170+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
170171 }
171172 }
172173 }
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