ci: throttle builds to avoid tests clashing (#3127)

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 <jakub@status.im>
This commit is contained in:
Jakub 2021-11-25 22:22:08 +01:00 committed by GitHub
parent f69b272850
commit 0dd497640a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

16
Jenkinsfile vendored
View File

@ -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()
}
}
}
},