From 7c3441dfbb683aa9a5d10623627d9a43484c67fb Mon Sep 17 00:00:00 2001 From: Kathiresan Selvaraj Date: Mon, 15 Apr 2024 11:49:34 -0400 Subject: [PATCH 1/3] Publish Data API jar to internal repo in offline mode --- .github/workflows/jar-publish.yaml | 75 ++++++++++++++++++++++++++++++ pom.xml | 36 ++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 .github/workflows/jar-publish.yaml diff --git a/.github/workflows/jar-publish.yaml b/.github/workflows/jar-publish.yaml new file mode 100644 index 0000000000..59384a6330 --- /dev/null +++ b/.github/workflows/jar-publish.yaml @@ -0,0 +1,75 @@ +name: JAR Publish + +# runs on +# * every push on the "main" +# * manual trigger +on: + push: + branches: [ "main" ] + workflow_dispatch: + +# global env vars, available in all jobs and steps +env: + MAVEN_OPTS: '-Xmx4g' + DSE_ARTIFACTORY_USERNAME: ${{ secrets.DSE_ARTIFACTORY_USERNAME }} + DSE_ARTIFACTORY_PASSWORD: ${{ secrets.DSE_ARTIFACTORY_PASSWORD }} + +jobs: + + # builds and publishes the jar + main: + name: Build and Publish Jar + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + cache: maven + + - name: Setup Maven + run: | + mkdir -p ~/.m2 + cat < ~/.m2/settings.xml + + + + stargate-central + ${DSE_ARTIFACTORY_USERNAME} + ${DSE_ARTIFACTORY_PASSWORD} + + + stargate-snapshots + ${DSE_ARTIFACTORY_USERNAME} + ${DSE_ARTIFACTORY_PASSWORD} + + + artifactory + ${DSE_ARTIFACTORY_USERNAME} + ${DSE_ARTIFACTORY_PASSWORD} + + + artifactory-snapshots + ${DSE_ARTIFACTORY_USERNAME} + ${DSE_ARTIFACTORY_PASSWORD} + + + artifactory-releases + ${DSE_ARTIFACTORY_USERNAME} + ${DSE_ARTIFACTORY_PASSWORD} + + + + EOF + + - name: Build + run: | + JAVA_HOME=$JAVA_17 ./mvnw -B -ntp clean package -P offline + + - name: Publish JAR + run: | + JAVA_HOME=$JAVA_17 ./mvnw -B -ntp clean deploy -DskipTests -P offline \ No newline at end of file diff --git a/pom.xml b/pom.xml index a08b5a312f..cef9536711 100644 --- a/pom.xml +++ b/pom.xml @@ -247,6 +247,42 @@ 6G + + offline + + + artifactory + https://repo.datastax.com/dse + + true + + + true + + + + + + com.datastax.dse + dse-db-all + 4.0.11-591d171ac9c9 + + + + + false + stargate-central + stargate-releases + https://repo.datastax.com/artifactory/stargate-private + + + false + stargate-snapshots + stargate-snapshots + https://repo.datastax.com/artifactory/stargate-private + + + dse-it From d6c1ab9117d808cacb983bb4339334e6238e6a6f Mon Sep 17 00:00:00 2001 From: Kathiresan Selvaraj Date: Mon, 15 Apr 2024 12:02:51 -0400 Subject: [PATCH 2/3] Changed Secrets Names --- .github/workflows/jar-publish.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/jar-publish.yaml b/.github/workflows/jar-publish.yaml index 59384a6330..b79aabf331 100644 --- a/.github/workflows/jar-publish.yaml +++ b/.github/workflows/jar-publish.yaml @@ -11,8 +11,8 @@ on: # global env vars, available in all jobs and steps env: MAVEN_OPTS: '-Xmx4g' - DSE_ARTIFACTORY_USERNAME: ${{ secrets.DSE_ARTIFACTORY_USERNAME }} - DSE_ARTIFACTORY_PASSWORD: ${{ secrets.DSE_ARTIFACTORY_PASSWORD }} + DS_ARTIFACTORY_USERNAME: ${{ secrets.DS_ARTIFACTORY_USERNAME }} + DS_ARTIFACTORY_PASSWORD: ${{ secrets.DS_ARTIFACTORY_PASSWORD }} jobs: @@ -39,28 +39,28 @@ jobs: stargate-central - ${DSE_ARTIFACTORY_USERNAME} - ${DSE_ARTIFACTORY_PASSWORD} + ${DS_ARTIFACTORY_USERNAME} + ${DS_ARTIFACTORY_PASSWORD} stargate-snapshots - ${DSE_ARTIFACTORY_USERNAME} - ${DSE_ARTIFACTORY_PASSWORD} + ${DS_ARTIFACTORY_USERNAME} + ${DS_ARTIFACTORY_PASSWORD} artifactory - ${DSE_ARTIFACTORY_USERNAME} - ${DSE_ARTIFACTORY_PASSWORD} + ${DS_ARTIFACTORY_USERNAME} + ${DS_ARTIFACTORY_PASSWORD} artifactory-snapshots - ${DSE_ARTIFACTORY_USERNAME} - ${DSE_ARTIFACTORY_PASSWORD} + ${DS_ARTIFACTORY_USERNAME} + ${DS_ARTIFACTORY_PASSWORD} artifactory-releases - ${DSE_ARTIFACTORY_USERNAME} - ${DSE_ARTIFACTORY_PASSWORD} + ${DS_ARTIFACTORY_USERNAME} + ${DS_ARTIFACTORY_PASSWORD} From 422bcd97ac43f405c9e5b0434798a932f9ff3ecc Mon Sep 17 00:00:00 2001 From: Kathiresan Selvaraj Date: Mon, 29 Apr 2024 13:08:47 -0400 Subject: [PATCH 3/3] Removed on-merge-to-main event trigger. --- .github/workflows/jar-publish.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/jar-publish.yaml b/.github/workflows/jar-publish.yaml index b79aabf331..5a935bb6ae 100644 --- a/.github/workflows/jar-publish.yaml +++ b/.github/workflows/jar-publish.yaml @@ -1,11 +1,8 @@ name: JAR Publish # runs on -# * every push on the "main" # * manual trigger on: - push: - branches: [ "main" ] workflow_dispatch: # global env vars, available in all jobs and steps