File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,19 @@ jobs:
2222 distribution : temurin # Temurin is a distribution of adoptium
2323 java-version : 11
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 : |
3136 export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
3237 export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
3338 echo "::add-mask::$SONATYPE_USERNAME"
3439 echo "::add-mask::$SONATYPE_PASSWORD"
35- ./gradlew publishPluginZipPublicationToSnapshotsRepository
40+ ./gradlew --no-daemon publishPluginZipPublicationToSnapshotsRepository
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ buildscript {
4545 mavenLocal()
4646 mavenCentral()
4747 maven { url " https://plugins.gradle.org/m2/" }
48+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
4849 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
4950 maven { url " https://artifacts.opensearch.org/snapshots/lucene/" }
5051 maven { url " https://build.shibboleth.net/nexus/content/groups/public" }
@@ -420,7 +421,7 @@ publishing {
420421 repositories {
421422 maven {
422423 name = " Snapshots" // optional target repository name
423- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
424+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
424425 credentials {
425426 username " $System . env . SONATYPE_USERNAME "
426427 password " $System . env . SONATYPE_PASSWORD "
@@ -433,6 +434,7 @@ repositories {
433434 mavenLocal()
434435 mavenCentral()
435436 maven { url " https://plugins.gradle.org/m2/" }
437+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
436438 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
437439 maven { url " https://artifacts.opensearch.org/snapshots/lucene/" }
438440 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/" }
You can’t perform that action at this time.
0 commit comments