Skip to content

Commit e2fa022

Browse files
Daniel Muehlbachlerromani
authored andcommitted
Issue #270: send jacoco coverage to sonarqube
1 parent ddc61dc commit e2fa022

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.ci/wercker.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ sonarqube)
3232
fi
3333
if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi
3434
export MAVEN_OPTS='-Xmx2000m'
35-
mvn -e -Pno-validations clean package sonar:sonar $SONAR_PR_VARIABLES \
35+
mvn -e -Psonarqube-validations clean package jacoco:report sonar:sonar $SONAR_PR_VARIABLES \
3636
-Dsonar.host.url=https://sonarcloud.io \
3737
-Dsonar.login=$SONAR_TOKEN \
3838
-Dsonar.projectKey=checkstyle_sonar-checkstyle \
39-
-Dsonar.organization=checkstyle
39+
-Dsonar.organization=checkstyle \
40+
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
4041
echo "report-task.txt:"
4142
cat target/sonar/report-task.txt
4243
echo "Verification of sonar gate status"

pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@
784784
<id>no-validations</id>
785785
<properties>
786786
<skipTests>true</skipTests>
787+
<skipITs>true</skipITs>
787788
<checkstyle.skip>true</checkstyle.skip>
788789
<pmd.skip>true</pmd.skip>
789790
<spotbugs.skip>true</spotbugs.skip>
@@ -793,6 +794,19 @@
793794
<maven.javadoc.skip>true</maven.javadoc.skip>
794795
</properties>
795796
</profile>
797+
<profile>
798+
<!-- To be used during wercker's sonarqube step. -->
799+
<id>sonarqube-validations</id>
800+
<properties>
801+
<skipITs>true</skipITs>
802+
<checkstyle.skip>true</checkstyle.skip>
803+
<pmd.skip>true</pmd.skip>
804+
<spotbugs.skip>true</spotbugs.skip>
805+
<xml.skip>true</xml.skip>
806+
<forbiddenapis.skip>true</forbiddenapis.skip>
807+
<maven.javadoc.skip>true</maven.javadoc.skip>
808+
</properties>
809+
</profile>
796810
</profiles>
797811

798812
</project>

0 commit comments

Comments
 (0)