From 5a97760982bdbf151ade5d29febe5a5e320e75ce Mon Sep 17 00:00:00 2001 From: cimbalek Date: Thu, 8 Feb 2024 19:46:15 +0100 Subject: [PATCH] kie-issues#777: Allow restricting jenkins agent labels for pipelines --- .ci/jenkins/Jenkinsfile | 2 +- .ci/jenkins/Jenkinsfile.deploy | 1 + .ci/jenkins/Jenkinsfile.promote | 1 + .ci/jenkins/Jenkinsfile.setup-branch | 1 + .ci/jenkins/Jenkinsfile.turtle | 1 + .ci/jenkins/project/Jenkinsfile.drools | 1 + .ci/jenkins/project/Jenkinsfile.nightly | 2 +- .ci/jenkins/project/Jenkinsfile.post-release | 1 + .ci/jenkins/project/Jenkinsfile.release | 2 +- .ci/jenkins/project/Jenkinsfile.setup-branch | 2 +- 10 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile index 35dced411b1..ca8e818f540 100644 --- a/.ci/jenkins/Jenkinsfile +++ b/.ci/jenkins/Jenkinsfile @@ -4,7 +4,7 @@ pr_check_script = null pipeline { agent { - label 'ubuntu' + label util.avoidFaultyNodes('ubuntu') } options { timestamps() diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy index 3dbcda10a72..8720e139a56 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -19,6 +19,7 @@ pipeline { docker { image env.AGENT_DOCKER_BUILDER_IMAGE args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() } } diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 3572b4f35c5..91a522d8b2f 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -16,6 +16,7 @@ pipeline { docker { image env.AGENT_DOCKER_BUILDER_IMAGE args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() } } diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch index 9afd8dd0821..c4ecf8919cd 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch +++ b/.ci/jenkins/Jenkinsfile.setup-branch @@ -8,6 +8,7 @@ pipeline { docker { image env.AGENT_DOCKER_BUILDER_IMAGE args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() } } diff --git a/.ci/jenkins/Jenkinsfile.turtle b/.ci/jenkins/Jenkinsfile.turtle index 97f8bc6c3ce..7afc96e2c06 100644 --- a/.ci/jenkins/Jenkinsfile.turtle +++ b/.ci/jenkins/Jenkinsfile.turtle @@ -9,6 +9,7 @@ pipeline { docker { image env.AGENT_DOCKER_BUILDER_IMAGE args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() } } options { diff --git a/.ci/jenkins/project/Jenkinsfile.drools b/.ci/jenkins/project/Jenkinsfile.drools index af3fb68c448..128ae534b80 100644 --- a/.ci/jenkins/project/Jenkinsfile.drools +++ b/.ci/jenkins/project/Jenkinsfile.drools @@ -11,6 +11,7 @@ pipeline { docker { image env.AGENT_DOCKER_BUILDER_IMAGE args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() } } environment { diff --git a/.ci/jenkins/project/Jenkinsfile.nightly b/.ci/jenkins/project/Jenkinsfile.nightly index 45dd9ec4a0b..441359bc743 100644 --- a/.ci/jenkins/project/Jenkinsfile.nightly +++ b/.ci/jenkins/project/Jenkinsfile.nightly @@ -19,7 +19,7 @@ UNSTABLE_STAGES = [:] // Should be multibranch pipeline pipeline { agent { - label 'ubuntu' + label util.avoidFaultyNodes('ubuntu') } options { diff --git a/.ci/jenkins/project/Jenkinsfile.post-release b/.ci/jenkins/project/Jenkinsfile.post-release index 08b6eec9ce0..ae3382cf55e 100644 --- a/.ci/jenkins/project/Jenkinsfile.post-release +++ b/.ci/jenkins/project/Jenkinsfile.post-release @@ -13,6 +13,7 @@ pipeline { docker { image env.AGENT_DOCKER_BUILDER_IMAGE args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() } } diff --git a/.ci/jenkins/project/Jenkinsfile.release b/.ci/jenkins/project/Jenkinsfile.release index 784c2b85148..5e0403b2504 100644 --- a/.ci/jenkins/project/Jenkinsfile.release +++ b/.ci/jenkins/project/Jenkinsfile.release @@ -18,7 +18,7 @@ releaseProperties = [:] pipeline { agent { - label 'ubuntu' + label util.avoidFaultyNodes('ubuntu') } environment { diff --git a/.ci/jenkins/project/Jenkinsfile.setup-branch b/.ci/jenkins/project/Jenkinsfile.setup-branch index f54d7f3ba5f..db3dac38964 100644 --- a/.ci/jenkins/project/Jenkinsfile.setup-branch +++ b/.ci/jenkins/project/Jenkinsfile.setup-branch @@ -12,7 +12,7 @@ UNSTABLE_STAGES = [:] pipeline { agent { - label 'ubuntu' + label util.avoidFaultyNodes('ubuntu') } options {