We are using the Jenkins Webhook plugin to notify Jenkins of a changes in the Stash repo. This works as long as new commits are push to Stash.
But how can we trigger a rebuild of a pull request when no new commit has been pushed?
Well, actually we also tried the Rebuild Plugin, but that does not work either because the Git Plugin keeps the latest checkout in memory.
I implemented a workaround by implementing a bookmarklet that searches for the latest commit id in the HTML page of Stash; this plugin is then using the REST API of the Jenkins Git Plugin to trigger the correct build.
This issue is registered at https://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/64. Currently a solution is being worked out; see: https://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/pulls
Maybe Atlassian can have a helping hand there :-) ?
Looks like a fun project, if I can steal some time I'll take a look at it - though as I mentioned, my experience with Jenkins is a little limited :)
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Apply agile practices
Transform how you manage your work with agile practices, including kanban and scrum frameworks.
Learning Path
Configure agile boards for Jira projects
Learn how to create and configure agile Jira boards so you can plan, prioritize, and estimate upcoming work.
Jira Essentials with Agile Mindset
Suitable for beginners, this live instructor-led full-day course will set up your whole team to understand how to use Jira with an agile methodology.