Abort previous pull request build when new changes pushed with ghprb jenkins plugin.
Changes:
- abort the old build with the new one that starts building changes for the same pull request
- build with higher build number will abort the build with lower build number
Credits to:
Thanks for this! My working version is below. I removed the commit id check as my project only builds on branches and not PRs, therefore,
ghprbPullId
seemed to benull
.I also needed to approve a bunch of methods to be executed in the script, simply check if your log has something like "administrator needs to approve blah blah", follow that link and click approve