Sonarqube not reporting results back to Jenkins and Gerrit #149
-
Jenkins and plugins versions reportI have a Jenkins freestyle job that is triggered as downstream job. When it is triggered, it downloads the changes and runs a Sonarqube Analysis on them. After the analysis is done, it is supposed to post comments on Gerrit about the results. Unfortunately, no matter what the result of the Sonarqube analysis, the comment always says "sonarqube violations have not been found." Sonarqube version: 9.9 Could you please suggest what is the issue here ? What Operating System are you using (both controller, and any agents involved in the problem)?ubuntu Reproduction stepsEnabled webhook in sonarqube but still it is not working. Expected ResultsActual ResultsAnything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I got the same issue. Looking at the <sonarqube_server>/api/issues/search?components=<PROJECT_KEY>&pullRequest=<PULL_REQUEST> I see the list of issues. But the "Issues to be commented" is zero. |
Beta Was this translation helpful? Give feedback.
-
I have the exact same problem. Sonarqube version: 10.2.1 |
Beta Was this translation helpful? Give feedback.
-
In my case, the problem was resolved by providing the necessary access to the SonarQube project for the service user used during the SonarQube analysis. This ensured that the analysis job could access and retrieve the relevant data. |
Beta Was this translation helpful? Give feedback.
-
Closing based on #147 (comment) |
Beta Was this translation helpful? Give feedback.
-
The problem was indeed the missing "Browse" permission for the service user. Might be worth mentioning that requirement in the readme. |
Beta Was this translation helpful? Give feedback.
In my case, the problem was resolved by providing the necessary access to the SonarQube project for the service user used during the SonarQube analysis. This ensured that the analysis job could access and retrieve the relevant data.