Skip to content

Commit 211d9ee

Browse files
committed
Fix notification being sent on success
1 parent 177e111 commit 211d9ee

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Jenkinsfile-SmokeTest

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ timestamps {
139139
echo "Exception was caught: ${e}"
140140
currentBuild.result = 'FAILURE'
141141
} finally {
142-
echo "Current build result: ${currentBuild.result}"
143-
if (currentBuild.result != 'SUCCESS') {
142+
if (currentBuild.resultIsWorseOrEqualTo('UNSTABLE')) {
144143
def color = ['UNSTABLE': 'warning', 'FAILURE': 'danger']
145144
def message = currentBuild.result == 'UNSTABLE' ? "Tests failed" : 'An unexpected error occurred while running tests'
146145

0 commit comments

Comments
 (0)