mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
[FIXED JENKINS-16718] check executor has been interrupted
This commit is contained in:
1 parent
cd52d0f0e0
commit
29426012ce
1 file changed
+6
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user