title: How to limit Jenkins concurrent multibranch pipeline builds?
body: <p>I am looking at limiting the number of concurrent builds to a specific number in Jenkins, leveraging the multibranch pipeline workflow but haven't found any good way to do this in the docs or google.</p>
  
  <p>Some docs say this can be accomplished using concurrency in the <code>stage</code> step of a Jenkinsfile but I've also <a href="https://jenkins.io/blog/2016/10/16/stage-lock-milestone/" rel="noreferrer">read elsewhere</a> that that is a deprecated way of doing it.</p>
  
  <p>It looks like there was <a href="https://issues.jenkins-ci.org/browse/JENKINS-34547" rel="noreferrer">something released</a> fairly recently for limiting concurrency via <code>Job Properties</code> but I couldn't find documentation for it and I'm having trouble following the code.  The only thing I found a <a href="https://github.com/jenkinsci/workflow-job-plugin/pull/8" rel="noreferrer">PR</a> that shows the following:</p>
  
  <p><code>properties([concurrentBuilds(false)])</code></p>
  
  <p>But I am having trouble getting it working.</p>
  
  <p>Does anybody know or have a good example of how to limit the number of concurrent builds for a given, multibranch project?  Maybe a Jenkinsfile snippet that shows how to limit or cap the number of multibranch concurrent builds?</p>