Hi I have setup sonarqube in Azure DevOps Pipeilnes in the following way:
- task: SonarQubePrepare@5
condition: succeededOrFailed()
displayName: 'Prepare analysis on SonarQube'
inputs:
SonarQube: 'xxx-connection'
scannerMode: 'CLI'
cliProjectKey: 'xxxx'
configMode: 'manual'
continueOnError: 'true'
Dsonar.projectKey: 'xxx'
cliProjectName: 'xxxx'
Dsonar.sources: ./
Dsonar.host.url: xxxx
Dsonar.login: xxxx
extraProperties: |
sonar.core.codeCoveragePlugin=cobertura
sonar.python.coverage.reportPaths=$(System.DefaultWorkingDirectory)/coverage-reports/coverage-report.xml
sonar.exclusions=**/*.pyc
sonar.projectKey=xxxxx
sonar.projectName=xxxxx
sonar.sources=./
sonar.host.url=xxxxx
sonar.login=xxxx
And in the pipeline I can see that code coverage is being picked up correctly:
INFO: Sensor Python Sensor [python] (done) | time=67071ms
INFO: Sensor Cobertura Sensor for Python coverage [python]
INFO: Python test coverage
INFO: Parsing report 'xxxxx/_work/57/s/coverage-reports/coverage-report.xml'
INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=1553ms
However in sonarqube I am still seeing 0% code coverage (while in the report is 80%…)
Why is that? What else I need to check if its working?