File tree Expand file tree Collapse file tree 7 files changed +17
-11
lines changed Expand file tree Collapse file tree 7 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,17 @@ jobs:
2525 distribution : temurin # Temurin is a distribution of adoptium
2626 java-version : 11
2727 - uses : actions/checkout@v3
28- -
uses :
aws-actions/[email protected] 28+
29+ - name : Load secret
30+ uses : 1password/load-secrets-action@v2
2931 with :
30- role-to-assume : ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
31- aws-region : us-east-1
32+ # Export loaded secrets as environment variables
33+ export-env : true
34+ env :
35+ 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
38+
3239 - name : publish snapshots to maven
3340 run : |
34- export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
35- export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
36- echo "::add-mask::$SONATYPE_USERNAME"
37- echo "::add-mask::$SONATYPE_PASSWORD"
3841 ./gradlew publishPluginZipPublicationToSnapshotsRepository publishShadowPublicationToSnapshotsRepository
Original file line number Diff line number Diff line change 55
66repositories {
77 mavenLocal()
8+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
89 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
910 mavenCentral()
1011 maven {url ' https://oss.sonatype.org/content/repositories/snapshots/' }
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ buildscript {
3030
3131 repositories {
3232 mavenLocal()
33+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
3334 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
3435 mavenCentral()
3536 maven { url " https://plugins.gradle.org/m2/" }
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ publishing {
8181 }
8282 maven {
8383 name = " Snapshots"
84- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
84+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
8585 credentials {
8686 username " $System . env . SONATYPE_USERNAME "
8787 password " $System . env . SONATYPE_PASSWORD "
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ publishing {
117117 }
118118 maven {
119119 name = " Snapshots" // optional target repository name
120- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
120+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
121121 credentials {
122122 username " $System . env . SONATYPE_USERNAME "
123123 password " $System . env . SONATYPE_PASSWORD "
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ publishing {
119119 mavenCentral()
120120 maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
121121 name = " Snapshots"
122- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
122+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
123123 credentials {
124124 username " $System . env . SONATYPE_USERNAME "
125125 password " $System . env . SONATYPE_PASSWORD "
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ apply plugin: 'opensearch.java'
1818repositories {
1919 mavenLocal()
2020 mavenCentral()
21+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
2122 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
2223}
2324
@@ -96,7 +97,7 @@ publishing {
9697 }
9798 maven {
9899 name = " Snapshots" // optional target repository name
99- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
100+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
100101 credentials {
101102 username " $System . env . SONATYPE_USERNAME "
102103 password " $System . env . SONATYPE_PASSWORD "
You can’t perform that action at this time.
0 commit comments