From 97c4e6049e22e632fa1607524e708435692696a8 Mon Sep 17 00:00:00 2001 From: David DE CARVALHO Date: Sat, 21 Dec 2024 22:29:36 +0100 Subject: [PATCH] update sonarcloud connection --- .github/workflows/build.yml | 12 +++++++++--- pom.xml | 3 --- sonar-project.properties | 4 ++++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dc9155b..7c234c61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,8 +44,14 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@4.2.1 # Ex: v4.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-rules-specifications + # SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} + +# - name: Build and analyze +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +# run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-rules-specifications diff --git a/pom.xml b/pom.xml index 264d7eba..73a41f07 100644 --- a/pom.xml +++ b/pom.xml @@ -134,9 +134,6 @@ ${encoding} ${encoding} - green-code-initiative - https://sonarcloud.io - diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..402259c9 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.host.url=https://sonarcloud.io +sonar.organization=green-code-initiative +sonar.projectKey=green-code-initiative_creedengo-rules-specifications +sonar.sources=. \ No newline at end of file