From 0a8d0de161a96e9e4344a63a71d398d05974f58d Mon Sep 17 00:00:00 2001 From: kcs-bandihareesh Date: Thu, 3 Oct 2024 15:06:33 +0530 Subject: [PATCH] updated worflow with sonar token and pom and settings file --- .github/workflows/vertx-base.yaml | 16 ++-- pom.xml | 130 +++++------------------------- travis/new-settings.xml | 6 +- 3 files changed, 31 insertions(+), 121 deletions(-) diff --git a/.github/workflows/vertx-base.yaml b/.github/workflows/vertx-base.yaml index 9011a6a..69f7d19 100644 --- a/.github/workflows/vertx-base.yaml +++ b/.github/workflows/vertx-base.yaml @@ -33,7 +33,9 @@ jobs: run: cp ./travis/new-settings.xml ~/.m2/settings.xml - name: Build and test with Maven - run: mvn -e -Pcoverage verify + run: mvn -e -Pcoverage verify sonar:sonar + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Show Surefire test reports on failure if: failure() @@ -72,13 +74,11 @@ jobs: env: GCP_ACCESS_TOKEN: ${{ secrets.GCP_ACCESS_TOKEN }} - - name: Deploy Snapshots with Retry Logic + - name: Deploy Snapshots run: | - for i in {1..3}; do - mvn -Dmaven.wagon.http.retryHandler.count=10 \ - -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 \ - -Dmaven.wagon.http.timeout=3600000 \ - --batch-mode -e -DskipTests=true deploy -X && break || sleep 30; - done + mvn -Dmaven.wagon.http.retryHandler.count=5 \ + -Dmaven.wagon.httpconnectionManager.ttlSeconds=30 \ + -Dmaven.wagon.http.timeout=1200000 \ + --batch-mode -e -DskipTests=true deploy -X env: GCP_ACCESS_TOKEN: ${{ secrets.GCP_ACCESS_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index d324278..cfb693b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 com.github.susom @@ -15,6 +17,9 @@ 3.9.13 UTF-8 UTF-8 + susom_vertx-base + susom + https://sonarcloud.io @@ -165,6 +170,7 @@ + org.apache.maven.plugins maven-compiler-plugin @@ -174,6 +180,8 @@ 17 + + org.apache.maven.plugins maven-shade-plugin @@ -203,87 +211,32 @@ com.github.susom.vertx.base.shaded.org.apache.commons.lang3 - - - *:* - - *.astub - META-INF/**/* - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.1.2 - - true - - - - org.apache.maven.plugins - maven-jar-plugin - 3.0.2 - - - default-jar - - jar - - package - - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - - attach-sources - - jar-no-fork - - - - com/github/susom/**/* - + + - org.apache.maven.plugins - maven-javadoc-plugin - 3.5.0 + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.9.1.2184 - attach-javadocs - jar + sonar - - none - - + + org.apache.maven.plugins - maven-release-plugin - 2.5.3 + maven-surefire-plugin + 3.1.2 - true - false - release - deploy + true @@ -316,48 +269,5 @@ - - release - - gpg - ${env.GPG_KEY_NAME} - ${env.GPG_PASSPHRASE} - - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.6 - true - - ossrh - https://oss.sonatype.org/ - true - - - - - \ No newline at end of file diff --git a/travis/new-settings.xml b/travis/new-settings.xml index d48e7f1..b5f5db6 100644 --- a/travis/new-settings.xml +++ b/travis/new-settings.xml @@ -23,8 +23,8 @@ - oauth2accesstoken - ${env.GCP_ACCESS_TOKEN} + _json_key_base64 + ${env.ARTIFACT_REGISTRY_KEY} ossrh @@ -37,4 +37,4 @@ ${env.GITHUB_TOKEN} - + \ No newline at end of file