美文网首页
Jenkins pipeline 触发下游作业build job

Jenkins pipeline 触发下游作业build job

作者: 星辰大海Star | 来源:发表于2020-09-08 19:37 被阅读0次
    node {
        
        stage('umf-center-deploy') { 
            echo "触发/05_消息中心/umf-center-deploy流水线"
            build job: '/05_消息中心/umf-center-deploy', wait: true
        }
        stage('umf-quartz-deploy'){
            echo "触发/05_消息中心/umf-quartz-deploy流水线"
            build job: '/05_消息中心/umf-quartz-deploy', wait: true
        }
        
        stage('umf-tools-deploy') {
            echo "触发/05_消息中心/umf-tools-deploy流水线"
            build job: '/05_消息中心/umf-tools-deploy', wait: true
        
        }
    }
    
    
    stage('testing') {
        def package = [:]
    
        for(i = 0; i < params.size(); i += 1) {
            def param = params[i]
    
            branches["Test${i}"] = {
                build job: 'Test', parameters: [string(name: 'Name', value: param)], quietPeriod: 2
            }
        }
        parallel branches
    }
    

    https://www.jenkins.io/doc/pipeline/examples/#jobs-in-parallel

    相关文章

      网友评论

          本文标题:Jenkins pipeline 触发下游作业build job

          本文链接:https://www.haomeiwen.com/subject/zepjektx.html