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 3535 export-env : true
3636 env :
3737 OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
38- SONATYPE_USERNAME : op://opensearch-infra-secrets/maven-central-portal-credentials/username
39- SONATYPE_PASSWORD : op://opensearch-infra-secrets/maven-central-portal-credentials/password
38+ MAVEN_SNAPSHOTS_S3_REPO : op://opensearch-infra-secrets/maven-snapshots-s3/repo
39+ MAVEN_SNAPSHOTS_S3_ROLE : op://opensearch-infra-secrets/maven-snapshots-s3/role
40+
41+ - name : Configure AWS credentials
42+ uses : aws-actions/configure-aws-credentials@v5
43+ with :
44+ role-to-assume : ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
45+ aws-region : us-east-1
4046
4147 - name : publish snapshots to maven
4248 run : |
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ buildscript {
2828 mavenLocal()
2929 mavenCentral()
3030 maven { url " https://plugins.gradle.org/m2/" }
31- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
32- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
31+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
3332 }
3433
3534 dependencies {
@@ -52,8 +51,7 @@ repositories {
5251 mavenLocal()
5352 mavenCentral()
5453 maven { url " https://plugins.gradle.org/m2/" }
55- maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
56- maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
54+ maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
5755}
5856apply plugin : ' java'
5957apply plugin : ' jacoco'
@@ -108,10 +106,11 @@ publishing {
108106 repositories {
109107 maven {
110108 name = " Snapshots"
111- url = " https://central.sonatype.com/repository/maven-snapshots/"
112- credentials {
113- username System . getenv(" SONATYPE_USERNAME" )
114- password System . getenv(" SONATYPE_PASSWORD" )
109+ url = System . getenv(" MAVEN_SNAPSHOTS_S3_REPO" )
110+ credentials(AwsCredentials ) {
111+ accessKey = System . getenv(" AWS_ACCESS_KEY_ID" )
112+ secretKey = System . getenv(" AWS_SECRET_ACCESS_KEY" )
113+ sessionToken = System . getenv(" AWS_SESSION_TOKEN" )
115114 }
116115 }
117116 }
You can’t perform that action at this time.
0 commit comments