stash-pullrequest-builder-plugin
stash-pullrequest-builder-plugin copied to clipboard
Cancel outdated jobs not working with multiple jobs.
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).
I created a pull request to fix this issue if anybody is interested.
https://github.com/nemccarthy/stash-pullrequest-builder-plugin/pull/122
I've posted the issue in the jenkins Jira: https://issues.jenkins-ci.org/browse/JENKINS-57956