参数
disableConcurrentBuilds()
完整pipeline
pipeline {
agent any
options{
timestamps ()
disableConcurrentBuilds()
}
stages {
stage('get code ') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'git@123.com:newback/123b.git']]])
}
}
}
}
效果如下: 会列队式等前面的任务完才进行下一个任务