Update CI pipeline to include build step before Sonar scan
Added a Maven build step (`mvn clean package -DskipTests`) to ensure compiled binaries are available for the SonarQube analysis. Also specified the `sonar.java.binaries` parameter to point to the correct output directory.
This commit is contained in:
+2
-1
@@ -51,7 +51,8 @@ sonarcloud_scan:
|
|||||||
paths:
|
paths:
|
||||||
- .maven-cache
|
- .maven-cache
|
||||||
script:
|
script:
|
||||||
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN}
|
- mvn clean package -DskipTests
|
||||||
|
- sonar-scanner -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.organization=${SONAR_ORGANIZATION} -Dsonar.token=${SONAR_TOKEN} -Dsonar.java.binaries=target/classes
|
||||||
only:
|
only:
|
||||||
- merge_requests
|
- merge_requests
|
||||||
- develop
|
- develop
|
||||||
|
|||||||
Reference in New Issue
Block a user