Skip to content

Commit ccaaf0e

Browse files
committed
Abort child jobs on build interrupt
- Added a check for current build result, to determine if it is aborted. - If the build is aborted, terminate the child jobs by breaking the loop. Signed-off-by: Anna Babu Palathingal <[email protected]>
1 parent 150debf commit ccaaf0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

buildenv/jenkins/JenkinsfileBase

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,10 @@ def runTest( ) {
765765
}
766766
for (int i = 1; i <= ITERATIONS; i++) {
767767
echo "ITERATION: ${i}/${ITERATIONS}"
768+
if (currentBuild.result == 'ABORTED') {
769+
echo "Build is aborted. Stop the loop...."
770+
break
771+
}
768772
if (env.SPEC.contains('linux') && !(LABEL.contains('ci.agent.dynamic') && CLOUD_PROVIDER == 'azure') && (BUILD_LIST != "external")) {
769773
// Add an additional 10 second timeout due to issue: https://github.com/adoptium/temurin-build/issues/2368#issuecomment-756683888
770774
wrap([$class: 'Xvfb', autoDisplayName: true, timeout:20]) {

0 commit comments

Comments
 (0)