Gerrit build posting comments from post build actions in Jenkins

520 Views Asked by At

I have integrated Sonar gerrit plugin to post sonar reports as comment in the gerrit web ui. Posting the sonar comments is configured in the post build action of the gerrit build to be posted under sonar-verified category.Verified scoring is posted by the gerrit build's success/failure.

But sonar violations comments are posted as part of verified scoring.

this is also not consistent. sometimes the sonar violation comments are properly posted under sonar-verified category.Screenshot of the issue

Probably the scoring on two different labels happens in two different threads and comments are posted whichever finishes first Please find the attached screenshot

Best Regards, Saurav

1

There are 1 best solutions below

1
On BEST ANSWER

Yes. You have answered your question yourself. Suggestion: add a dummy post-build action before the "Post SonarQube issues" to introduce a delay (like "sleep 10) to workaround this issue.