diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 24c8b3ec68..98ac6ae3f7 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -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]) {