Hello Team,
i am working on get the Coverage SQ reporting on my dashboard, using Jenkins pipeline.
the configuration I have is the following:
stage(‘SonarQube Scan’){
steps{
script{
sonarHome = tool ‘sonar.isolutions.ds’
}
withSonarQubeEnv(‘sonar.isolutions.ds’) {
sh "${sonarHome}/bin/sonar-runner -Dsonar.host.url=http://sonar.isolutions.ds/sonar -Dsonar.projectKey=${sonar_project} -Dsonar.projectName=${sonar_project} -Dsonar.projectVersion=${FULL_VERSION_STRING} -Dsonar.sources='${WORKSPACE}/src-webapp/src' -Dsonar.java.binaries='${WORKSPACE}/build/libs' -Dsonar.exclusions='${WORKSPACE}/src, ${WORKSPACE}/src-webapp/node_modules/**/*, ${WORKSPACE}/src-webapp/dist/**/*, **/*.spec.ts, **/*test.ts, **/*.js, **/*.css, **/*.scss' -Dsonar.test.inclusions='**/*.spec.ts,**/*test.ts' -Dsonar.tests='${WORKSPACE}/src/test' -Dsonar.coverage.jacoco.xmlReportPaths='${WORKSPACE}/build/reports/jacoco/test'"
}
}
}
The coverage just doesn’t work, the result is 0%
Is there something missing in my pipeline? the XML file I have already generated with gradle and the PATH is correct, which is: Dsonar.coverage.jacoco.xmlReportPaths=’${WORKSPACE}/build/reports/jacoco/test
i dont know what is missing…
Thanks for your support,