ciricihq / gitlab-sonar-scanner

This project is no longer maintained
GNU General Public License v3.0
80 stars 62 forks source link

Uploading coverage report? #50

Open tflorac opened 4 years ago

tflorac commented 4 years ago

Hi, I just tried to use your Docker image to integrate Gitlab and SonarQube. I have a Gitlab-CI job which is generating a test coverage report in XML format (which is stored as an artefact). How can I upload this report to Sonar? Best regards, Thierry

tflorac commented 4 years ago

I added "sonar.python.coverage.reportPaths=coverage.xml" to sonar-project.properties. I can see this in Gitlab-CI job console:

100 INFO: Python test coverage
101 INFO: Parsing report '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-utils/coverage.xml'

But coverage measure is always shown at 0% in SonarQube, while it is displayed normally if I run "sonar-scanner" directly...

tflorac commented 4 years ago

I ommitted to say that SONAR_ANALYSIS_MODE is set to "publish" in job configuration...!