Closed petterm closed 7 years ago
Hi @petterm, which version of SonarQube are you using? If we don't get the data from sonarqube there is not much we can do -.-
From https://docs.sonarqube.org/display/DEV/Adding+Hooks :
when the scanner sends the raw report to Compute Engine. The extension point org.sonar.api.batch.postjob.PostJob must be implemented. It is executed whatever the scanner mode ("preview" or not). List of open and resolved issues is available only if the mode "preview" is enabled. Measures and Quality gate can not be accessed, whatever the mode.The GitHub and Bitbucket plugins rely on this extension point.
So you are saying it is working as intended then? If so that seems like something that should be in the documentation for this plugin?
Im running the following it that is still of interest: SonarQube: Version 6.3.1 Jenkins: Version 2.32.3 SonarQube Scanner for Jenkins: Version 2.6
Yes, this is working as intended by SonarQube. I don't think there is anything we can do about this (with reasonable effort).
I think this should be documented on SonarQube side, as it affects all plugins implemented as PostJob
s.
It is currently documented but I agree that the location is not really obvious. It should be documented with the different publishing modes.
I did see now that you do mention it in the docs for this plugin as well. Might be that I just missed it but it seems easy to miss.
https://github.com/AmadeusITGroup/sonar-stash#how-to-run-the-plugin
For SonarQube 5.2+:
sonar-runner -Dsonar.analysis.mode=preview \ -Dsonar.stash.notification=true -Dsonar.stash.project=<PROJECT> -Dsonar.stash.repository=<REPO> \ -Dsonar.stash.pullrequest.id=<PR_ID> -Dsonar.stash.password=<STASH_PASSWORD>...
Thanks for the assistance either way.
I have a setup with Bitbucket server, Jenkins and SonarQube running and had a stab att getting them integrated together.
A problem I got into was that even though the analysis works fine when looking in the SonarQube project I couldn't get the stash plugin to post anything else than that it found no new issues.
I looked through the issues reported here and started out by building the 1.3-SNAPSHOT from pull-request #127 although that did not seem to fix my issue (I do still use it though since I probably would end up with the resource keys being a problem down the line). I continued troubleshooting and added some logging to the plugin to check that it actually received any issues.
Added inside
StashIssueReportingPostJob
executeOn
Using that I concluded that no issues were received by the plugin at all.
Further research led me to issue #43 that looked much like my problem. When testing out the suggestion there i set
sonar.analysis.mode=preview
and now the plugin receives issues and I get comments working.This should be enough for my setup to work but it means I will have to run the analysis twice to get issues both into Bitbucket and to SonarQube though.