File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed
Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,15 @@ jobs:
2222 distribution : temurin # Temurin is a distribution of adoptium
2323 java-version : 21
2424 - uses : actions/checkout@v4
25- - uses : aws-actions/configure-aws-credentials@v4
25+ - name : Load secret
26+ uses : 1password/load-secrets-action@v2
2627 with :
27- role-to-assume : ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
28- aws-region : us-east-1
28+ # Export loaded secrets as environment variables
29+ export-env : true
30+ env :
31+ OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
32+ SONATYPE_USERNAME : op://opensearch-infra-secrets/maven-central-portal-credentials/username
33+ SONATYPE_PASSWORD : op://opensearch-infra-secrets/maven-central-portal-credentials/password
2934 - name : publish snapshots to maven
3035 run : |
31- export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
32- export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
33- echo "::add-mask::$SONATYPE_USERNAME"
34- echo "::add-mask::$SONATYPE_PASSWORD"
3536 ./gradlew --no-daemon publishPluginZipPublicationToSnapshotsRepository publishShadowPublicationToSnapshotsRepository
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ buildscript {
4848 mavenLocal()
4949 mavenCentral()
5050 maven { url " https://plugins.gradle.org/m2/" }
51+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
5152 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
5253 maven { url " https://artifacts.opensearch.org/snapshots/lucene/" }
5354 maven { url " https://build.shibboleth.net/nexus/content/groups/public" }
@@ -422,7 +423,7 @@ publishing {
422423 repositories {
423424 maven {
424425 name = " Snapshots" // optional target repository name
425- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
426+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
426427 credentials {
427428 username " $System . env . SONATYPE_USERNAME "
428429 password " $System . env . SONATYPE_PASSWORD "
@@ -503,6 +504,7 @@ allprojects {
503504 mavenLocal()
504505 mavenCentral()
505506 maven { url " https://plugins.gradle.org/m2/" }
507+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
506508 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
507509 maven { url " https://artifacts.opensearch.org/snapshots/lucene/" }
508510 maven { url " https://build.shibboleth.net/nexus/content/repositories/releases" }
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ buildscript {
5151 }
5252 repositories {
5353 mavenLocal()
54+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
5455 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
5556 mavenCentral()
5657 maven { url " https://plugins.gradle.org/m2/" }
@@ -63,6 +64,7 @@ buildscript {
6364
6465repositories {
6566 mavenLocal()
67+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
6668 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
6769 mavenCentral()
6870 maven { url " https://plugins.gradle.org/m2/" }
Original file line number Diff line number Diff line change 5555repositories {
5656 mavenLocal()
5757 mavenCentral()
58+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
5859 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
5960}
6061
Original file line number Diff line number Diff line change 1616repositories {
1717 mavenLocal()
1818 mavenCentral()
19+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
1920 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
2021}
2122
@@ -80,7 +81,7 @@ publishing {
8081 repositories {
8182 maven {
8283 name = " Snapshots"
83- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
84+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
8485 credentials {
8586 username " $System . env . SONATYPE_USERNAME "
8687 password " $System . env . SONATYPE_PASSWORD "
You can’t perform that action at this time.
0 commit comments