0

Anyone has idea how to limit number of concurrent builds on Jenkins for multi-branch pipeline? I was searching out but almost every approach was about putting properties([disableConcurrentBuilds()]) which doesn't work in my case.

We use resource lock for unit tests, so they don't overlap. In my case no matter how many build executors I have they will just wait on lock to be released so they continue one by one while reserving build slot instead waiting in queue. I found some similar post:

Jenkins limit multibranch

Nick
  • 1

1 Answers1

0

for gitlab pipelines use parameter resource_group for create a resource group that ensures a job is mutually exclusive across different pipelines for the same project: https://docs.gitlab.com/ee/ci/yaml/#resource_group

for jenkins: plugin and parameter "Block build if certain jobs are running" https://plugins.jenkins.io/build-blocker-plugin/

vvsco
  • 1
  • 1