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

Cancel outdated jobs not working with multiple jobs. #121

Open jordijansen opened 7 years ago

jordijansen commented 7 years ago

Hi,

I'm having a issue using the "Cancel outdated jobs" option. I'm having two job definitions that built the same repository (so they get triggered on the same Pull Requests, however they do two completly different things). When I have the option "Cancel outdated jobs" activated it will also cancel the jobs of the other job definition.

For example: Lets say I have have jobs A and B. I create a PullRequest, Job A is added to the queue. A little while later Job B is added to the queue because it triggers on the same repository/pull request. Job B cancels Job A because the Cancel outdated jobs option is activated.

I think it should only cancel the Jobs that are of the same definition (Job A may only cancel jobs of Job A type).

jordijansen commented 7 years ago

I created a pull request to fix this issue if anybody is interested.

https://github.com/nemccarthy/stash-pullrequest-builder-plugin/pull/122

bartek-poleszak commented 5 years ago

I've posted the issue in the jenkins Jira: https://issues.jenkins-ci.org/browse/JENKINS-57956