找到了我想要的东西。您可以在Jenkinsfile中使用以下块来限制并发构建。
node { // This limits build concurrency to 1 per branch properties([disableConcurrentBuilds()]) //do stuff ...}使用声明性语法可以实现相同的目的:
pipeline { options { disableConcurrentBuilds() }}
找到了我想要的东西。您可以在Jenkinsfile中使用以下块来限制并发构建。
node { // This limits build concurrency to 1 per branch properties([disableConcurrentBuilds()]) //do stuff ...}使用声明性语法可以实现相同的目的:
pipeline { options { disableConcurrentBuilds() }}