Commit 7a046953 authored by mchrusci's avatar mchrusci Committed by Michał Karzyński

Disable email notification on aborted builds (#1954)

parent 722903ac
...@@ -174,6 +174,9 @@ def main(String label, String projectName, String projectRoot, String dockerCont ...@@ -174,6 +174,9 @@ def main(String label, String projectName, String projectRoot, String dockerCont
RunToxTests(configurationMaps) RunToxTests(configurationMaps)
} }
} }
catch(hudson.AbortException e) {
currentBuild.result = 'ABORTED'
}
finally { finally {
Cleanup(configurationMaps) Cleanup(configurationMaps)
Notify() Notify()
......
...@@ -86,6 +86,8 @@ def CreateStage(String stageName, Closure method, configurationMaps) { ...@@ -86,6 +86,8 @@ def CreateStage(String stageName, Closure method, configurationMaps) {
try { try {
def prepareEnvMap = GenerateMap(genericBodyMethod, configurationMaps) def prepareEnvMap = GenerateMap(genericBodyMethod, configurationMaps)
parallel prepareEnvMap parallel prepareEnvMap
} catch(hudson.AbortException e) {
AbortedException(e)
} catch(e) { } catch(e) {
Exception(e) Exception(e)
} }
...@@ -138,4 +140,8 @@ def Exception(e) { ...@@ -138,4 +140,8 @@ def Exception(e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
} }
def AbortedException(e) {
currentBuild.result = 'ABORTED'
}
return this return this
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment