Skip to content

Commit

Permalink
Abort child jobs on build interrupt
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
annaibm committed Oct 24, 2024
1 parent 150debf commit ccaaf0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,10 @@ def runTest( ) {
}
for (int i = 1; i <= ITERATIONS; i++) {
echo "ITERATION: ${i}/${ITERATIONS}"
if (currentBuild.result == 'ABORTED') {
echo "Build is aborted. Stop the loop...."
break
}
if (env.SPEC.contains('linux') && !(LABEL.contains('ci.agent.dynamic') && CLOUD_PROVIDER == 'azure') && (BUILD_LIST != "external")) {
// Add an additional 10 second timeout due to issue: https://github.com/adoptium/temurin-build/issues/2368#issuecomment-756683888
wrap([$class: 'Xvfb', autoDisplayName: true, timeout:20]) {
Expand Down

0 comments on commit ccaaf0e

Please sign in to comment.