Merge branch 'JENKINS-8054'

* JENKINS-8054:
  Set 'Aborted' result before invoking BuildWrapper's tearDown. Fixes JENKINS-7864 and JENKINS-8054.
This commit is contained in:
Kohsuke Kawaguchi committed 2011-02-08 11:53:03 -08:00
commit 7ef707390d
2 files changed
+8

No files matched your search

@@ -37,6 +37,7 @@ import java.util.Collection;
import java.util.List;
import java.util.logging.Logger;
import static hudson.model.Result.ABORTED;
import static hudson.model.Result.FAILURE;
/**
@@ -136,6 +137,9 @@ public abstract class Build <P extends Project<P,B>,B extends Build<P,B>>
if(!build(listener,project.getBuilders()))
r = FAILURE;
} catch (InterruptedException e) {
r = ABORTED;
throw e;
} finally {
if (r != null) setResult(r);
// tear down in reverse order