nemccarthy / stash-pullrequest-builder-plugin

A Jenkins plugin for Building Stash Pull Requests
https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin
Other
64 stars 130 forks source link

Enhancement: Update/Removed queued builds for PR #70

Closed nickbroon closed 8 years ago

nickbroon commented 8 years ago

If a PR is updated (which might happen often if rebuild if target branch changes option is used, or builds take a long time) it would be better to search the build queue for any queued jobs matching that PR and either update it or remove the queued job before adding a new one. That is to say there should only be one queued build per PR, as only the most recent is usually of interest. There are API that should make this possible, that can be called before job.scheduleBuild2. isInQueue and getQueueItem look the most relevant.

mandrizzle commented 8 years ago

I can make a pr for this but it only works for queued items at the moment. I have not found a way to cancel a running jobs yet.

nickbroon commented 8 years ago

I think cancelling queued items is sufficient.

mandrizzle commented 8 years ago

Figured out how to cancel running jobs too!

nickbroon commented 8 years ago

Resolved by #83

nemccarthy commented 8 years ago

Released in 1.7.0