AmadeusITGroup / sonar-stash

Stash (BitBucket) plugin, a pull-request decorator which allows to integrate SonarQube violations directly into your pull-request
MIT License
165 stars 81 forks source link

Autodetect the stash settings #148

Open t-8ch opened 7 years ago

t-8ch commented 7 years ago

When running under maven (and maybe other runners) we can access sonar.links.scm. This should allow us to calculate the baseurl, repository and project automatically (if the setting is correctly configured)

gauee commented 7 years ago

In my opinion it will be valuable to integrate it also with jenkins plugin stash-notifier. What do you think?

t-8ch commented 7 years ago

@gauee Could you elaborate this?

gauee commented 7 years ago

@t-8ch We run the sonar analysis on pull-requests from jenkins. To trigger the build we are using the stashPullRequestBuilderPlugin which have already the credentials settings. The StashNotifier-plugin also have the stash credentials.

Im thinking about wrapping the execution of sonar goal into some jenkins plugin or adding the custom property to maven goal for loading some jenkins settings.

Which solution do you prefer, so I can try contribute with poc.

t-8ch commented 7 years ago

@gauee I would prefer to keep any notion of the execution environment out of the sonar-stash plugin. If you create a dedicated plugin this is completely fine (although I think it is probably overkill), but then the plugin would not really care, right?