diff --git a/vars/build.groovy b/vars/build.groovy index 7d002ea47..8d62546c3 100644 --- a/vars/build.groovy +++ b/vars/build.groovy @@ -44,7 +44,11 @@ def call(Map params = [:]){ } catch (Exception e) { def buildLogOutput = currentBuild.rawBuild.getLog(2).find { it.contains('Starting building') } url = getRedirectLink(buildLogOutput, job) - throw new BuildException(getBuildId(buildLogOutput), Result.FAILURE, e.getCauses()) + if (e instanceof FlowInterruptedException) { + throw new BuildException(getBuildId(buildLogOutput), Result.FAILURE, e.getCauses()) + } else { + throw new BuildException(getBuildId(buildLogOutput), Result.FAILURE) + } } finally { log(level: 'INFO', text: "${url}") }