Merge pull request #49870 from KaiSforza/ci_actually_fail

Actually catch the exception when we fail
This commit is contained in:
Daniel Wallace 2018-10-02 19:51:49 -05:00 committed by GitHub
commit 0662e37e0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 1 deletions

View file

@ -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'

View file

@ -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'

View file

@ -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',

View file

@ -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'

View file

@ -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'

View file

@ -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'