File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,7 @@ timestamps{
413
413
}
414
414
415
415
def runTest () {
416
+ boolean wasAborted = false
416
417
try {
417
418
def retry_count = 0
418
419
def sleep_time = 180
@@ -490,17 +491,18 @@ def runTest() {
490
491
println (" Exception: " + e. toString())
491
492
// build result may not be updated correctly at the moment (see https://issues.jenkins.io/browse/JENKINS-56402)
492
493
// if there is an exception, set currentBuild.result to ABORTED/FAILURE
493
- if (e. toString(). contains(" FlowInterruptedException" ) || currentBuild. rawBuild. getExecutor()?. isInterrupted()) {
494
- currentBuild. result = ' ABORTED'
494
+ if (e. toString(). contains(" FlowInterruptedException" )) {
495
+ wasAborted = true
496
+ currentBuild. result = ' ABORTED'
495
497
echo " Build aborted by user or another trigger."
496
498
} else {
497
499
currentBuild. result = ' FAILURE'
498
500
}
499
501
500
502
} finally {
501
- if (currentBuild . rawBuild . getExecutor() ?. isInterrupted() ) {
503
+ if (wasAborted ) {
502
504
currentBuild. result = ' ABORTED'
503
- echo " Build aborted by user or another trigger ."
505
+ echo " aborted build ."
504
506
}
505
507
if (params. SLACK_CHANNEL ) {
506
508
timeout(time : 5 , unit : ' MINUTES' ) {
You can’t perform that action at this time.
0 commit comments