[FIXED JENKINS-16718] check executor has been interrupted

This commit is contained in:
Nicolas De Loof committed 2013-02-11 19:36:59 +01:00
1 parent cd52d0f0e0
commit 29426012ce
1 file changed
+6 -1
+6 -1
View File
@@ -195,11 +195,16 @@ public abstract class Build <P extends Project<P,B>,B extends Build<P,B>>
}
private boolean build(BuildListener listener, Collection<Builder> steps) throws IOException, InterruptedException {
for( BuildStep bs : steps )
for( BuildStep bs : steps ) {
if(!perform(bs,listener)) {
LOGGER.fine(MessageFormat.format("{0} : {1} failed", Build.this.toString(), bs));
return false;
}
if (getExecutor().isInterrupted()) {
// someone asked build interruption, let stop the build before trying to run another build step
throw new InterruptedException();
}
}
return true;
}
}