From 0dd497640a6e994657042534a4ec2d57e382403e Mon Sep 17 00:00:00 2001 From: Jakub Date: Thu, 25 Nov 2021 22:22:08 +0100 Subject: [PATCH] ci: throttle builds to avoid tests clashing (#3127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses: https://plugins.jenkins.io/throttle-concurrents/#example-1-throttling-of-node-runs The `nimbus-eth` category limits builds to one per node in global settings. Signed-off-by: Jakub SokoĊ‚owski --- Jenkinsfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b3a6d1aca..f1ab34401 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -93,16 +93,20 @@ def runStages() { parallel( "Linux": { - node("linux") { - withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) { - runStages() + throttle(['nimbus-eth2']) { + node("linux") { + withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) { + runStages() + } } } }, "macOS": { - node("macos") { - withEnv(["NPROC=${sh(returnStdout: true, script: 'sysctl -n hw.logicalcpu').trim()}"]) { - runStages() + throttle(['nimbus-eth2']) { + node("macos") { + withEnv(["NPROC=${sh(returnStdout: true, script: 'sysctl -n hw.logicalcpu').trim()}"]) { + runStages() + } } } },