jenkins禁止并行构建

    技术2025-01-21  15

    参数

    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']]]) } } } }

    效果如下: 会列队式等前面的任务完才进行下一个任务

    Processed: 0.011, SQL: 12