SonarQube 8.6.0 Missing code coverage on new lines in PR analysis

  • which versions are you using (SonarQube 8.6.0-developer, Sonar Maven Plugin 3.8.0.2131)
  • what are you trying to achieve
    Java project pull-request running in Jenkins (github multi-branch project)
  • what have you tried so far to achieve this
    maven builds code & runs tests using:
        stage('Build & Analyze') {
          sh 'mv $sonarCREDS ./settings.xml'
          sh 'set -xe; printenv; java -version ; mvn --version'
          sh 'mvn -B -s ./settings.xml org.jacoco:jacoco-maven-plugin:prepare-agent clean install org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom org.jacoco:jacoco-maven-plugin:report-aggregate -Dmaven.test.failure.ignore=false'
          sh 'mvn -B -s ./settings.xml -N deploy:deploy'
          sh 'mvn -B -s ./settings.xml -pl udf-model-schema-core deploy'
          sh 'mvn -B -s ./settings.xml -pl udf-model-schema-processor deploy'
          sh 'mvn -B -s ./settings.xml -pl udf-model-schema-ingested deploy'
          sh 'mvn -B -s ./settings.xml -pl udf-model-schema-publish deploy'
          sh 'mvn -B -s ./settings.xml -pl udf-model-schema-verified deploy'
          deptrackUpload projectName: projectName, projectVersion: projectVersion, artifact:  'target/bom.xml'
          junit '**/target/surefire-reports/*.xml'
          step([$class: 'JacocoPublisher'])
          def xmlFilesInDir = findFiles(glob: '**/jacoco.xml')
          String filePaths = ""
          for (resultsFile in xmlFilesInDir) {
            filePaths += "${workspace}/${resultsFile},"
          }
          sh "mvn -B -e  -Dsonar.coverage.jacoco.xmlReportPaths=$filePaths  ${sonarOptions}  sonar:sonar"
       }

where sonarOptions is '-Dsonar.userHome=/home/gradle -Dsonar.host.url=https://sonarqube.example.com -Dsonar.login=<some-secure-token>'udf-model-schema_PR-117_debug.log (59.6 KB)

Hi,

This seems to be the CE log. The Compute Engine only stores and aggregates (and stores the aggregations of) the data it’s sent. If there’s data missing, you should look to the analysis log.

 
Ann

The analysis log? Where would that be? The server maintains only access.log, ce.log, es.log and web.log.

Hi,

Yes, this is on the analysis side. So in Jenkins, Cirrus, etc.

 
Ann