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
4 changes: 2 additions & 2 deletions .github/get-sonatype-credentials.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
# Script to retrieve Sonatype credentials from AWS Secrets Manager

SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
SONATYPE_USERNAME=op://opensearch-infra-secrets/maven-central-portal-credentials/username
SONATYPE_PASSWORD=op://opensearch-infra-secrets/maven-central-portal-credentials/password
echo "::add-mask::$SONATYPE_USERNAME"
echo "::add-mask::$SONATYPE_PASSWORD"
echo "SONATYPE_USERNAME=$SONATYPE_USERNAME" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
id: lychee
uses: lycheeverse/lychee-action@master
with:
args: --accept=200,403,429,999 "./**/*.html" "./**/*.md" "./**/*.txt" --exclude "https://aws.oss.sonatype.*|http://localhost.*|https://localhost|https://odfe-node1:9200/|https://community.tableau.com/docs/DOC-17978|.*family.zzz|opensearch*|.*@amazon.com|.*email.com|.*@github.com|http://timestamp.verisign.com/scripts/timstamp.dll"
args: --accept=200,403,429,999 "./**/*.html" "./**/*.md" "./**/*.txt" --exclude "https://aws.oss.sonatype.*|https://central.sonatype.*|http://localhost.*|https://localhost|https://odfe-node1:9200/|https://community.tableau.com/docs/DOC-17978|.*family.zzz|opensearch*|.*@amazon.com|.*email.com|.*@github.com|http://timestamp.verisign.com/scripts/timstamp.dll"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Fail if there were link errors
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 2.*

env:
SNAPSHOT_REPO_URL: https://aws.oss.sonatype.org/content/repositories/snapshots/
SNAPSHOT_REPO_URL: https://central.sonatype.com/repository/maven-snapshots/

jobs:
build-and-publish-snapshots:
Expand All @@ -28,15 +28,15 @@ jobs:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1.7.0
- name: Load secret
uses: 1password/load-secrets-action@v2
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
aws-region: us-east-1

- name: get credentials
run: |
# Get credentials for publishing
.github/get-sonatype-credentials.sh
# Export loaded secrets as environment variables
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

- name: publish snapshots to maven
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/publish-async-query-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: false

env:
SNAPSHOT_REPO_URL: https://aws.oss.sonatype.org/content/repositories/snapshots/
SNAPSHOT_REPO_URL: https://central.sonatype.com/repository/maven-snapshots/
COMMIT_MAP_FILENAME: commit-history-async-query-core.json

jobs:
Expand All @@ -40,15 +40,15 @@ jobs:

- uses: actions/checkout@v3

- uses: aws-actions/configure-aws-credentials@v1.7.0
- name: Load secret
uses: 1password/load-secrets-action@v2
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
aws-region: us-east-1

- name: Setup publishing credentials
id: creds
run: |
.github/get-sonatype-credentials.sh
# Export loaded secrets as environment variables
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

- name: Set commit ID
id: set_commit
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/publish-grammar-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: false

env:
SNAPSHOT_REPO_URL: https://aws.oss.sonatype.org/content/repositories/snapshots/
SNAPSHOT_REPO_URL: https://central.sonatype.com/repository/maven-snapshots/
COMMIT_MAP_FILENAME: commit-history-language-grammar.json

jobs:
Expand All @@ -44,15 +44,15 @@ jobs:

- uses: actions/checkout@v3

- uses: aws-actions/configure-aws-credentials@v1.7.0
- name: Load secret
uses: 1password/load-secrets-action@v2
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
aws-region: us-east-1

- name: Setup publishing credentials
id: creds
run: |
.github/get-sonatype-credentials.sh
# Export loaded secrets as environment variables
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

- name: Set version
id: set_version
Expand Down
2 changes: 1 addition & 1 deletion integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ext {
noticeFile = rootProject.file('NOTICE')

getSecurityPluginDownloadLink = { ->
var repo = "https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/" +
var repo = "https://central.sonatype.com/repository/maven-snapshots/org/opensearch/plugin/" +
"opensearch-security/$opensearch_build_snapshot/"
var metadataFile = Paths.get(projectDir.toString(), "build", "maven-metadata.xml").toAbsolutePath().toFile()
download.run {
Expand Down
2 changes: 1 addition & 1 deletion plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ publishing {
repositories {
maven {
name = "Snapshots" // optional target repository name
url = "https://aws.oss.sonatype.org/content/repositories/snapshots"
url = "https://central.sonatype.com/repository/maven-snapshots/"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
Expand Down