Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add one-off executor to search list for cancel job
By "Build Current Pathcset Only" feature, running and queued jobs with
the same change are canceled. These are found in queue items and
executors.

But MatrixJob uses one-off executor. It is not included in executors. So
it cannot be canceled.

This patch adds one-off executors to executor's list.

Fix for JENKINS-24295

Task-Url: https://issues.jenkins-ci.org/browse/JENKINS-24295
  • Loading branch information
rinrinne committed Sep 11, 2014
1 parent bbbf405 commit 8b0e9be
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1980,7 +1980,10 @@ private void cancelJob(ParametersAction parameters) {

// Interrupt any currently running jobs.
for (Computer c : Hudson.getInstance().getComputers()) {
for (Executor e : c.getExecutors()) {
List<Executor> executors = new ArrayList<Executor>();
executors.addAll(c.getOneOffExecutors());
executors.addAll(c.getExecutors());
for (Executor e : executors) {
if (e.getCurrentExecutable() instanceof Actionable) {
Actionable a = (Actionable)e.getCurrentExecutable();
List<ParametersAction> params = a.getActions(ParametersAction.class);
Expand Down

0 comments on commit 8b0e9be

Please sign in to comment.