Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ jobs:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1

- name: publish snapshots to maven
run: |
Expand Down
3 changes: 1 addition & 2 deletions build-tools/repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

repositories {
mavenLocal()
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
mavenCentral()
maven {url 'https://oss.sonatype.org/content/repositories/snapshots/'}
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ buildscript {

repositories {
mavenLocal()
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
Expand Down
9 changes: 5 additions & 4 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ publishing {
}
maven {
name = "Snapshots"
url = "https://central.sonatype.com/repository/maven-snapshots/"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
credentials(AwsCredentials) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
sessionToken = System.getenv("AWS_SESSION_TOKEN")
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ publishing {
}
maven {
name = "Snapshots" // optional target repository name
url = "https://central.sonatype.com/repository/maven-snapshots/"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
credentials(AwsCredentials) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
sessionToken = System.getenv("AWS_SESSION_TOKEN")
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ publishing {
mavenCentral()
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/lucene/" }
name = "Snapshots"
url = "https://central.sonatype.com/repository/maven-snapshots/"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
credentials(AwsCredentials) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
sessionToken = System.getenv("AWS_SESSION_TOKEN")
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ apply plugin: 'opensearch.java'
repositories {
mavenLocal()
mavenCentral()
maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
}

ext {
Expand Down Expand Up @@ -97,10 +96,11 @@ publishing {
}
maven {
name = "Snapshots" // optional target repository name
url = "https://central.sonatype.com/repository/maven-snapshots/"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
credentials(AwsCredentials) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
sessionToken = System.getenv("AWS_SESSION_TOKEN")
}
}
}
Expand Down
Loading