Skip to content

Commit

Permalink
Handle hudson.AbortException as interruption class
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Isenberg committed Aug 18, 2017
1 parent 50da26e commit f07ef6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class TestCluster implements Serializable {
script.sh "./dcos-launch create -c ${platform}_config.yaml -i ${platform}_cluster_info.json"
script.sh "./dcos-launch wait -i ${platform}_cluster_info.json"
break
} catch(InterruptedException e) {
} catch(InterruptedException | hudson.AbortException e) {
script.echo("Build interrupted. Destroying cluster....")
destroy()
script.echo("Cluster destroyed. Exiting...")
Expand Down Expand Up @@ -220,7 +220,7 @@ def testBuilder(String platform, String nodeId, String workspace = null) {
"DCOS_ACS_TOKEN=${acsToken}"]) {
try {
body()
} catch(InterruptedException e) {
} catch(InterruptedException | hudson.AbortException e) {
echo(
"Build interrupted. The DC/OS cluster at" +
" ${dcosUrl} will be destroyed.")
Expand Down

0 comments on commit f07ef6c

Please sign in to comment.