Use currentBuild.resultIsBetterOrEqualTo instead

This commit is contained in:
Pedro Algarvio 2019-05-27 08:10:09 +01:00
parent cefdd907c1
commit 166067c591
No known key found for this signature in database
GPG Key ID: BB36BF6584A298FF
13 changed files with 13 additions and 26 deletions

View File

@ -88,8 +88,7 @@ timeout(time: 8, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 8, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 8, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -88,8 +88,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -87,8 +87,7 @@ timeout(time: 6, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',

View File

@ -87,8 +87,7 @@ timeout(time: 8, unit: 'HOURS') {
junit 'artifacts/xml-unittests-output/*.xml'
} finally {
cleanWs notFailBuild: true
def currentResult = currentBuild.result ?: 'SUCCESS'
if (currentResult == 'SUCCESS') {
if (currentBuild.resultIsBetterOrEqualTo('SUCCESS')) {
githubNotify credentialsId: 'test-jenkins-credentials',
description: "The ${TEST_SUITE}-${TEST_PLATFORM} job has passed",
status: 'SUCCESS',