-
Bug
-
Resolution: Fixed
-
Major
There is a report in the Wiki about the plugin crashing in StashBuildTrigger#run
https://wiki.jenkins.io/display/JENKINS/Stash+pullrequest+builder+plugin
The documentation for Trigger#run() says:
Maybe run even before start(hudson.model.Item, boolean), prepare for it.
https://javadoc.jenkins.io/hudson/triggers/Trigger.html#run--
We are definitely not prepared. I don't think running start() from run() would be a good idea, but being defensive and avoiding long chains of method calls would help.
While at that, the "Build started" could be really improved, it's probably the only "happy case" INFO message from the plugin, and it's woefully non-informative.
Also, make sure stop() reverts the effects of start() and makes run() fail before start() is run again.