From de3d94c0982fd967796bc8c989e744b52b7889c7 Mon Sep 17 00:00:00 2001 From: Clemi2806 <38780028+Clemi2806@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:15:56 +0100 Subject: [PATCH 1/2] ci: Add steps before sonarqube analysis --- .github/workflows/sonarqube.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index a1fb952..758dfb8 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -41,6 +41,15 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml - name: Analyze with SonarQube # You can pin the exact commit or the version. From 7d43c63d6a4d5114e825dc4320b8ea99d0f62544 Mon Sep 17 00:00:00 2001 From: Clemi2806 <38780028+Clemi2806@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:22:08 +0100 Subject: [PATCH 2/2] ci: Add binaries property to sonarqube --- .github/workflows/sonarqube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 758dfb8..4df455b 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -66,6 +66,7 @@ jobs: # mandatory -Dsonar.projectKey=Kilowatt-Commando_controller-service -Dsonar.organization=kilowatt-commando + -Dsonar.java.binaries=target/classes # Comma-separated paths to directories containing main source files. #-Dsonar.sources= # optional, default is project base directory # When you need the analysis to take place in a directory other than the one from which it was launched