Can I perform a sonar scan on Gerrit patch?

As part of my precheckin workflow in Gerrit, I want to set up sonarqube to perform a scan on the presented patch, I use the Sonar-gerrit plugin in my Jenkins and set up a gerrit-trigger to run this analysis. This job is configured with preview mode and analysis is in progress, but analysis occurs in a repository that does not include the submitted patchset. How can I ensure that analysis is performed on a set of patches?

+3


source to share


1 answer


Use the $ GERRIT_REFSPEC variable to set up your job as follows:



enter image description here

+3


source







All Articles