mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
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:
parent
7fa20430f7
commit
9ef9206520
6 changed files with 13 additions and 1 deletions
|
@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
|
|||
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
} finally {
|
||||
try {
|
||||
junit 'artifacts/xml-unittests-output/*.xml'
|
||||
|
|
|
@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
|
|||
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
} finally {
|
||||
try {
|
||||
junit 'artifacts/xml-unittests-output/*.xml'
|
||||
|
|
|
@ -54,13 +54,15 @@ timeout(time: 6, unit: 'HOURS') {
|
|||
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
} finally {
|
||||
try {
|
||||
junit 'artifacts/xml-unittests-output/*.xml'
|
||||
} finally {
|
||||
cleanWs notFailBuild: true
|
||||
def currentResult = currentBuild.result ?: 'SUCCESS'
|
||||
if ( currentResult == 'SUCCESS') {
|
||||
if (currentResult == 'SUCCESS') {
|
||||
githubNotify credentialsId: 'test-jenkins-credentials',
|
||||
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
|
||||
status: 'SUCCESS',
|
||||
|
|
|
@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
|
|||
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
} finally {
|
||||
try {
|
||||
junit 'artifacts/xml-unittests-output/*.xml'
|
||||
|
|
|
@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
|
|||
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
} finally {
|
||||
try {
|
||||
junit 'artifacts/xml-unittests-output/*.xml'
|
||||
|
|
|
@ -54,6 +54,8 @@ timeout(time: 6, unit: 'HOURS') {
|
|||
archiveArtifacts artifacts: 'artifacts/logs/salt-runtests.log'
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
} finally {
|
||||
try {
|
||||
junit 'artifacts/xml-unittests-output/*.xml'
|
||||
|
|
Loading…
Add table
Reference in a new issue