File tree Expand file tree Collapse file tree 6 files changed +13
-9
lines changed
sample-remote-monitor-plugin Expand file tree Collapse file tree 6 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,16 @@ jobs:
2828 distribution : temurin # Temurin is a distribution of adoptium
2929 java-version : ${{ matrix.jdk }}
3030 - uses : actions/checkout@v4
31- - uses : aws-actions/configure-aws-credentials@v1
31+ - name : Load secret
32+ uses : 1password/load-secrets-action@v2
3233 with :
33- role-to-assume : ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
34- aws-region : us-east-1
34+ # Export loaded secrets as environment variables
35+ export-env : true
36+ env :
37+ 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
3540 - name : publish snapshots to maven
3641 run : |
37- export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
38- export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
39- echo "::add-mask::$SONATYPE_USERNAME"
40- echo "::add-mask::$SONATYPE_PASSWORD"
4142 ./gradlew publishShadowPublicationToSnapshotsRepository
4243 ./gradlew publishPluginZipPublicationToSnapshotsRepository
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ publishing {
8383 repositories {
8484 maven {
8585 name = " Snapshots"
86- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
86+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
8787 credentials {
8888 username " $System . env . SONATYPE_USERNAME "
8989 password " $System . env . SONATYPE_PASSWORD "
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}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ buildscript {
2828
2929 repositories {
3030 mavenLocal()
31+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
3132 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
3233 mavenCentral()
3334 maven { url " https://plugins.gradle.org/m2/" }
Original file line number Diff line number Diff line change 3030repositories {
3131 mavenLocal()
3232 mavenCentral()
33+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
3334 maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
3435}
3536
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ publishing {
4444 }
4545 maven {
4646 name = " Snapshots"
47- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
47+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
4848 credentials {
4949 username " $System . env . SONATYPE_USERNAME "
5050 password " $System . env . SONATYPE_PASSWORD "
You can’t perform that action at this time.
0 commit comments