简体   繁体   中英

Jenkins multibranch with Jenkinsfile in different repo

If use a multibranch pipeline in Jenkins, I want to have a build for every specific branch that is made inside my code repo. This works like a charm. But I don't want to provide a Jenkinsfile inside my code repo. Instead I want to define a different CI repo which is providing my CI pipeline scripts.

The problem is that the usual config is not containing the scm option like in the normal config.

Normal pipeline config:

在此处输入图片说明

Multibranch pipeline config:

在此处输入图片说明

Can somebody tell me how to separate the Jenkinsfile from my source code using a multibranch pipeline?

以防万一有人遇到同样的问题,有一个 Jenkins 插件可以为 mutlibranch pipleines 带来远程 Jenkinsfiles: https ://plugins.jenkins.io/remote-file/

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