File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 export-env : true
3333 env :
3434 OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
35- SONATYPE_USERNAME : op://opensearch-infra-secrets/maven-central-portal-credentials/username
36- SONATYPE_PASSWORD : op://opensearch-infra-secrets/maven-central-portal-credentials/password
35+ MAVEN_SNAPSHOTS_S3_REPO : op://opensearch-infra-secrets/maven-snapshots-s3/repo
36+ MAVEN_SNAPSHOTS_S3_ROLE : op://opensearch-infra-secrets/maven-snapshots-s3/role
37+
38+ - name : Configure AWS credentials
39+ uses : aws-actions/configure-aws-credentials@v5
40+ with :
41+ role-to-assume : ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
42+ aws-region : us-east-1
3743
3844 - name : publish snapshots to maven
3945 run : |
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ buildscript {
1616 mavenLocal()
1717 mavenCentral()
1818 maven { url " https://plugins.gradle.org/m2/" }
19- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
20- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
19+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
2120 }
2221
2322 dependencies {
@@ -38,8 +37,7 @@ repositories {
3837 mavenLocal()
3938 mavenCentral()
4039 maven { url " https://plugins.gradle.org/m2/" }
41- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
42- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
40+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
4341}
4442
4543allprojects {
@@ -181,10 +179,11 @@ publishing {
181179 }
182180 maven {
183181 name = " Snapshots"
184- url = " https://central.sonatype.com/repository/maven-snapshots/"
185- credentials {
186- username " $System . env . SONATYPE_USERNAME "
187- password " $System . env . SONATYPE_PASSWORD "
182+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
183+ credentials(AwsCredentials ) {
184+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
185+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
186+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
188187 }
189188 }
190189 }
You can’t perform that action at this time.
0 commit comments