File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Expand file tree Collapse file tree 3 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 @@ -33,8 +33,7 @@ buildscript {
3333
3434    repositories {
3535        mavenLocal()
36-         maven { url " https://central.sonatype.com/repository/maven-snapshots/"   }
37-         maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots"   }
36+         maven { url " https://ci.opensearch.org/ci/dbc/snapshots/maven/"   }
3837        mavenCentral()
3938        maven { url " https://plugins.gradle.org/m2/"   }
4039    }
@@ -203,10 +202,11 @@ publishing {
203202    repositories {
204203        maven {
205204            name =  " Snapshots" 
206-             url =  " https://central.sonatype.com/repository/maven-snapshots/" 
207-             credentials {
208-                 username " $System . env . SONATYPE_USERNAME  " 
209-                 password " $System . env . SONATYPE_PASSWORD  " 
205+             url =  System . getenv(" MAVEN_SNAPSHOTS_S3_REPO"  )
206+             credentials(AwsCredentials ) {
207+                 accessKey =  System . getenv(" AWS_ACCESS_KEY_ID"  )
208+                 secretKey =  System . getenv(" AWS_SECRET_ACCESS_KEY"  )
209+                 sessionToken =  System . getenv(" AWS_SESSION_TOKEN"  )
210210            }
211211        }
212212    }
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://plugins.gradle.org/m2/"   }
1211}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments