简体   繁体   中英

Jenkins build multibranch pipeline from another multibranch pipeline

I have Jenkins setup with 2 multibranch pipeline which depend on each other let say multibranchPipelineA and multibranchPipelineB . I would like a job from multibranchPipelineA to build specific branch in multibranchPipelineA and wait the build to finish

I have tried use below from multibranchPipeleA Jenkinfile

stage('Build MiniApp Libs') {
            steps {
                build(
                    job: "../multibranchPipeleB/master",
                    propagate: true,
                    wait: true
                )
            }
        }

But always receive No item named../multibranchPipeleB/master found.

If I use single pipeline, let's say pipelineB , then the below work ../pipelineB

How can I build specific branch multibranchPipeline from another multibranchPipeline jobs? and wait the build to finish?

To build another multibranchPipeline you do not need .. before its name. So in your case just use:

job: "multibranchPipeleB/master"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM