Must-share information (formatted with Markdown):
- which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) * Developer Edition
- v10.7 (96327)ACTIVE
- how is SonarQube deployed: zip, Docker, Helm zip
- what are you trying to achieve: trying to push code coverage results for nodejs project from azure devops
- what have you tried so far to achieve this
sonar-project.properties
:
sonar.projectKey=projectkey
sonar.sources=.
sonar.host.url=https://mydomainname
sonar.token=sqa_token
sonar.exclusions=**/*.yml,**/Dockerfile*,**/chart/**,**/node_modules/**
sonar.coverage.exclusions=**/app/server/sequelize/models/**,**/app/server/models/**
sonar.javascript.lcov.reportPaths=../TestResults/lcov.info
azure-pipelines.yml
:
- script: |
export DOTNET_ROOT=/usr/local/share/dotnet
export PATH=$PATH:/usr/local/share/dotnet:/usr/local/bin
echo $PATH
echo $DOTNET_ROOT
reportgenerator -reports:coverage/cobertura-coverage.xml -targetdir:coverage/lcov-report -reporttypes:HtmlInline_AzurePipelines
displayName: 'Generate HTML report'
continueOnError: false
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: 'coverage/cobertura-coverage.xml'
reportDirectory: 'coverage/lcov-report'
failIfCoverageEmpty: true
- task: SonarQubePrepare@7
displayName: prepare sonarqube environment
inputs:
SonarQube: 'SonarQube'
scannerMode: 'cli'
cliScannerVersion: '6.2.0.4584'
configMode: 'file'
continueOnError: false
- task: SonarQubeAnalyze@7
displayName: run sonarqube analysis
inputs:
jdkversion: 'JAVA_HOME_17_X64'
continueOnError: false
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)! no errors, sonarqube reports 0 coverage, while ADO says it has 100% coverage