From 5c9c63f34dc1481bc9eb8044f385c535d0bb23e9 Mon Sep 17 00:00:00 2001 From: cimbalek Date: Fri, 16 Feb 2024 17:05:30 +0100 Subject: [PATCH] kie-issues-777: attempt to fix scripted pipeline as well --- dsl/scripts/pr_check.groovy | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/dsl/scripts/pr_check.groovy b/dsl/scripts/pr_check.groovy index 49ab0fef3..0a0c35eda 100644 --- a/dsl/scripts/pr_check.groovy +++ b/dsl/scripts/pr_check.groovy @@ -20,7 +20,7 @@ import org.kie.jenkins.MavenCommand // TODO Docker image and args could be passed as env or anything ? -dockerGroups = [ +dockerGroups = [ 'docker', ] dockerArgs = [ @@ -39,21 +39,23 @@ void launch() { } void launchInDocker(String builderImage) { - docker.image(builderImage).inside(dockerArgs.join(' ')) { - sh 'printenv > env_props' - archiveArtifacts artifacts: 'env_props' - util.waitForDocker() - sh 'ls -last /var/run/docker.sock' - try { - launchStages() - } finally { - echo "Got build result ${currentBuild.currentResult}" - if (currentBuild.currentResult != 'SUCCESS') { - // TODO ci token as env ? - postComment( - util.getMarkdownTestSummary('PR', getReproducer(true), "${BUILD_URL}", 'GITHUB'), - 'kie-ci3-token' - ) + node(util.avoidFaultyNodes()) { + docker.image(builderImage).inside(dockerArgs.join(' ')) { + sh 'printenv > env_props' + archiveArtifacts artifacts: 'env_props' + util.waitForDocker() + sh 'ls -last /var/run/docker.sock' + try { + launchStages() + } finally { + echo "Got build result ${currentBuild.currentResult}" + if (currentBuild.currentResult != 'SUCCESS') { + // TODO ci token as env ? + postComment( + util.getMarkdownTestSummary('PR', getReproducer(true), "${BUILD_URL}", 'GITHUB'), + 'kie-ci3-token' + ) + } } } }