2

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]

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I got clear idea about background task. But why it is not showing me recent fail? It is showing me past failed details. I have updated my question
2

The default configuration for SonarQube way flags the code as failed if:

  1. the coverage on new code is less than 80%
  2. percentage of duplicated lines on new code is greater than 3
  3. maintainability, reliability or security rating is worse than A

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.