Actually catch the exception when we fail

This should actually cause builds to fail when any part in the try block
fails. We still delete instances and try junit rendering, but if things
fail then they get marked on github as failed.
This commit is contained in:
William Giokas 2018-10-03 14:13:48 +02:00
parent 1c8def9641
commit c88a81d059
No known key found for this signature in database
GPG Key ID: 690206D873CD09CF
6 changed files with 12 additions and 0 deletions

View File

@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log' archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
} }
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally { } finally {
try { try {
junit 'artifacts/xml-unittests-output/*.xml' junit 'artifacts/xml-unittests-output/*.xml'

View File

@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log' archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
} }
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally { } finally {
try { try {
junit 'artifacts/xml-unittests-output/*.xml' junit 'artifacts/xml-unittests-output/*.xml'

View File

@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log' archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
} }
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally { } finally {
try { try {
junit 'artifacts/xml-unittests-output/*.xml' junit 'artifacts/xml-unittests-output/*.xml'

View File

@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log' archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
} }
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally { } finally {
try { try {
junit 'artifacts/xml-unittests-output/*.xml' junit 'artifacts/xml-unittests-output/*.xml'

View File

@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log' archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
} }
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally { } finally {
try { try {
junit 'artifacts/xml-unittests-output/*.xml' junit 'artifacts/xml-unittests-output/*.xml'

View File

@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log' archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
} }
} }
} catch (Exception e) {
currentBuild.result = 'FAILURE'
} finally { } finally {
try { try {
junit 'artifacts/xml-unittests-output/*.xml' junit 'artifacts/xml-unittests-output/*.xml'