更新时间:2022-12-17 12:11:20
You can use the Lockable Resources Plugin to guarantee that the problematic steps do not run in parallel when on the master branch.
类似的东西:
stage('on master') {
when {
branch 'master'
}
steps {
lock(label: 'choose_a_label') {
// your steps
}
}
}
stage('not on master') {
when {
not {
branch 'master'
}
}
steps {
// your steps
}
}