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:
25
25
distribution : temurin # Temurin is a distribution of adoptium
26
26
java-version : 21
27
27
- uses : actions/checkout@v3
28
- -
uses :
aws-actions/[email protected]
28
+
29
+ - name : Load secret
30
+ uses : 1password/load-secrets-action@v2
29
31
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
+
32
39
- name : publish snapshots to maven
33
40
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"
38
41
./gradlew publishPluginZipPublicationToSnapshotsRepository publishShadowPublicationToSnapshotsRepository
Original file line number Diff line number Diff line change 5
5
6
6
repositories {
7
7
mavenLocal()
8
+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
8
9
maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
9
10
mavenCentral()
10
11
maven {url ' https://oss.sonatype.org/content/repositories/snapshots/' }
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ buildscript {
31
31
32
32
repositories {
33
33
mavenLocal()
34
+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
34
35
maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
35
36
mavenCentral()
36
37
maven { url " https://plugins.gradle.org/m2/" }
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ publishing {
82
82
}
83
83
maven {
84
84
name = " Snapshots"
85
- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
85
+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
86
86
credentials {
87
87
username " $System . env . SONATYPE_USERNAME "
88
88
password " $System . env . SONATYPE_PASSWORD "
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ publishing {
117
117
}
118
118
maven {
119
119
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/ "
121
121
credentials {
122
122
username " $System . env . SONATYPE_USERNAME "
123
123
password " $System . env . SONATYPE_PASSWORD "
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ publishing {
128
128
mavenCentral()
129
129
maven { url " https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
130
130
name = " Snapshots"
131
- url = " https://aws.oss. sonatype.org/content/repositories/ snapshots"
131
+ url = " https://central. sonatype.com/repository/maven- snapshots/ "
132
132
credentials {
133
133
username " $System . env . SONATYPE_USERNAME "
134
134
password " $System . env . SONATYPE_PASSWORD "
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ apply plugin: 'opensearch.java'
18
18
repositories {
19
19
mavenLocal()
20
20
mavenCentral()
21
+ maven { url " https://central.sonatype.com/repository/maven-snapshots/" }
21
22
maven { url " https://aws.oss.sonatype.org/content/repositories/snapshots" }
22
23
}
23
24
@@ -96,7 +97,7 @@ publishing {
96
97
}
97
98
maven {
98
99
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/ "
100
101
credentials {
101
102
username " $System . env . SONATYPE_USERNAME "
102
103
password " $System . env . SONATYPE_PASSWORD "
You can’t perform that action at this time.
0 commit comments