Skip to content

Commit a24479d

Browse files
committed
WS-2609: Try to get coverage data and branch info for Sonar.
1 parent 873a7a1 commit a24479d

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

CI.Jenkinsfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ node ("docker-light") {
1010
stage("Maven Build") {
1111
withSonarQubeEnv {
1212
sh "docker run --rm \
13-
--pull always \
14-
--volume ${sourceDir}:/source \
15-
--volume /opt/maven-basis:/opt/maven-basis \
16-
eclipse-temurin:17-jdk-focal \
17-
bash -c \"apt-get update && \
18-
apt-get install -y git && \
19-
pushd /source && \
20-
/opt/maven-basis/bin/mvn --batch-mode clean install && \
21-
/opt/maven-basis/bin/mvn --batch-mode sonar:sonar \
22-
-Dsonar.login=${env.SONAR_AUTH_TOKEN} \
23-
-Dsonar.host.url=${env.SONAR_HOST_URL}\""
13+
--pull always \
14+
--volume ${sourceDir}:/source \
15+
--volume /opt/maven-basis:/opt/maven-basis \
16+
eclipse-temurin:17-jdk-focal \
17+
bash -c \"apt-get update && \
18+
apt-get install -y git && \
19+
pushd /source && \
20+
/opt/maven-basis/bin/mvn --batch-mode clean install && \
21+
/opt/maven-basis/bin/mvn --batch-mode sonar:sonar \
22+
-Dsonar.login=${env.SONAR_AUTH_TOKEN} \
23+
-Dsonar.host.url=${env.SONAR_HOST_URL} \
24+
-Dsonar.coverage.jacoco.xmlReportPaths=./api/target/site/jacoco/jacoco.xml,./json/target/site/jacoco/jacoco.xml \
25+
-Dsonar.pullrequest.key=${env.CHANGE_ID} \
26+
-Dsonar.pullrequest.base=${env.CHANGE_TARGET} \
27+
-Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}\""
2428
}
2529
}
2630
slack(true)

0 commit comments

Comments
 (0)