简体   繁体   English

Jenkins 工作流在多个分支上轮询 SCM

[英]Jenkins Workflow Poll SCM On Multiple Branches

Were trying to use a Jenkins Workflow script to build multiple branches of the same repo.试图使用 Jenkins 工作流脚本来构建同一个 repo 的多个分支。

So essentially we want the job to react to changes in BranchA and BranchB and build whichever one has changed.所以本质上我们希望工作对BranchABranchB变化做出反应,并构建发生变化的任何一个。

From what I can understand about how SCM polling works with Workflow the branch that is being monitored is determined the first time the job runs based on which branch is cloned.根据我对 SCM 轮询如何与 Workflow 一起工作的了解,正在监视的分支是根据克隆的分支在作业第一次运行时确定的。

Does this mean this kind of multi-branch set-up isn't possible?这是否意味着这种多分支设置是不可能的?

Install the Workflow: Multibranch plugin and create a multibranch workflow project.安装Workflow: Multibranch插件并创建一个多分支工作流项目。 Each branch with a Jenkinsfile script will be built.将构建带有Jenkinsfile脚本的每个分支。 Use checkout scm to check out sources.使用checkout scm检查源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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