sonar-stash icon indicating copy to clipboard operation
sonar-stash copied to clipboard

Autodetect the stash settings

Open t-8ch opened this issue 7 years ago • 4 comments

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)

t-8ch avatar Aug 24 '17 16:08 t-8ch

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

gauee avatar Oct 10 '17 16:10 gauee

@gauee Could you elaborate this?

t-8ch avatar Oct 11 '17 09:10 t-8ch

@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.

gauee avatar Oct 11 '17 12:10 gauee

@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?

t-8ch avatar Oct 11 '17 12:10 t-8ch