Search code examples
jenkinssonarqube

sonarqube project failed


I am using sonarqube 6.1 which is integrated with Jenkins 2.48. In Jenkins, it is showing my build ran successfully. But in Sonarqube, it is showing Failed.

Jenkins :

POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Finished: SUCCESS

Sonarqube (Failed in red color) :

[![enter image description here][1]][1]

What "failed" mean in Sonarqube project? Does it means wrong configuration or wrong iteration with Jenkins?

How can I solve this?

I have checked in background task. Project failed recently but in project summery, it is showing past failed details. [![enter image description here][2]][2]


Solution

  • The SonarQube analysis is split into two separate tasks:

    • The 'Sonar Scanner' runs the analysis on the code (which is what happens in your Jenkins build) and packs the results and sends them of to the SonarQube instance.
    • The 'Compute Engine' (CE) uses the packed results and calculates several quality metrics (for ex. the CE is responsible to update the Quality Gate status)

    As your Jenkins build is successful this means that the Scanner did do it's work just fine, but on the CE side it failed to process the results of the scanner.

    See Background Tasks documentation on how to obtain the log of the CE task and see why the analysis results processing failed.