From cea0173426616d2ea588fe73d826a84c9d958c6d Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:51:27 -0800 Subject: [PATCH] CI pipeline update to publish geospatial-client jar (#706) (#708) * Update pipeline Signed-off-by: Andy Kwok * Update release note Signed-off-by: Andy Kwok --------- Signed-off-by: Andy Kwok (cherry picked from commit ba4e8c1a3d28fcd3348cc19b75dc744ba09629ff) Co-authored-by: Andy Kwok --- .github/workflows/maven-publish.yml | 10 +++++++++- CHANGELOG.md | 1 + client/build.gradle | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 724e3a21..e1e0947d 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -26,10 +26,18 @@ jobs: with: role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} aws-region: us-east-1 - - name: publish snapshots to maven + - name: publish snapshots zip to maven run: | export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) echo "::add-mask::$SONATYPE_USERNAME" echo "::add-mask::$SONATYPE_PASSWORD" ./gradlew publishPluginZipPublicationToSnapshotsRepository + - name: publish snapshots jar to maven + run: | + export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) + export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) + echo "::add-mask::$SONATYPE_USERNAME" + echo "::add-mask::$SONATYPE_PASSWORD" + ./gradlew :geospatial-client:publishNebulaPublicationToSnapshotsRepository + diff --git a/CHANGELOG.md b/CHANGELOG.md index 767c2b4d..244d7133 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on ho ### Bug Fixes ### Infrastructure - Github ci-runner Node.js issue fix ([#701](https://github.com/opensearch-project/geospatial/pull/701)) +- Github CI pipeline update to publish geospatial-client Jar ([#706](https://github.com/opensearch-project/geospatial/pull/706)) ### Documentation ### Maintenance ### Refactoring diff --git a/client/build.gradle b/client/build.gradle index 582c6640..0b53f089 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -55,6 +55,16 @@ spotless { } publishing { + repositories { + maven { + name = "Snapshots" + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } publications { pluginZip(MavenPublication) { publication -> pom {