Use setResult instead of getExecutor().interrupt to set FAILURE
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 14 Dec 2017 17:06:54 +0000 (12:06 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 14 Dec 2017 17:06:54 +0000 (12:06 -0500)
getExecutor().interrupt(FAILURE) flag the build as aborted event if the final status is FAILURE.
This influence triggers such as email.

07:28:26 lttng-modules_VERSION_param-build #334163 (v4.12.14) completed with status SUCCESS
07:28:26 lttng-modules_VERSION_param-build #334160 (v4.15-rc3) completed with status FAILURE
...
07:28:26 lttng-modules_VERSION_param-build #334220 (v2.6.37.6) completed with status SUCCESS
07:28:26 Build was aborted

Marked as "aborted".

07:28:26 Started calculate disk usage of build
07:28:26 Finished Calculation of disk usage of build in 0 seconds
07:28:26 Started calculate disk usage of workspace
07:28:26 Finished Calculation of disk usage of workspace in 0 seconds
07:28:26 [WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
07:28:26 No emails were triggered.

An email should have been fired here.

07:28:26 Finished: FAILURE

Final status is Failure. But no email were sent.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
scripts/latency-tracker/master-rt.groovy
scripts/latency-tracker/master.groovy
scripts/lttng-modules/master-rt.groovy
scripts/lttng-modules/master.groovy

index 9d94be2cc4dacb47c4a0e0edab91ffb3d71909b1..33eb0f386f2d094d7eca74fec9c2f9615b42c78f 100644 (file)
@@ -354,7 +354,7 @@ for (b in allBuilds) {
 
 // Mark this build failed if any child build has failed
 if (isFailed) {
-  build.getExecutor().interrupt(Result.FAILURE)
+  build.setResult(hudson.model.Result.FAILURE)
 }
 
 // EOF
index a8bf945f195f7696553915fdf800b12518cdfca9..323351c19bdedd5098dbeaed662ed1afb02ade8e 100644 (file)
@@ -528,7 +528,7 @@ for (b in allBuilds) {
 
 // Mark this build failed if any child build has failed
 if (isFailed) {
-  build.getExecutor().interrupt(Result.FAILURE)
+  build.setResult(hudson.model.Result.FAILURE)
 }
 
 // EOF
index 9d94be2cc4dacb47c4a0e0edab91ffb3d71909b1..33eb0f386f2d094d7eca74fec9c2f9615b42c78f 100644 (file)
@@ -354,7 +354,7 @@ for (b in allBuilds) {
 
 // Mark this build failed if any child build has failed
 if (isFailed) {
-  build.getExecutor().interrupt(Result.FAILURE)
+  build.setResult(hudson.model.Result.FAILURE)
 }
 
 // EOF
index a8bf945f195f7696553915fdf800b12518cdfca9..323351c19bdedd5098dbeaed662ed1afb02ade8e 100644 (file)
@@ -528,7 +528,7 @@ for (b in allBuilds) {
 
 // Mark this build failed if any child build has failed
 if (isFailed) {
-  build.getExecutor().interrupt(Result.FAILURE)
+  build.setResult(hudson.model.Result.FAILURE)
 }
 
 // EOF
This page took 0.025767 seconds and 4 git commands to generate.