user3617723
user3617723

Reputation: 1395

Jenkins Workflow Poll SCM On Multiple Branches

Were trying to use a Jenkins Workflow script to build multiple branches of the same repo.

So essentially we want the job to react to changes in BranchA and BranchB and build whichever one has changed.

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.

Does this mean this kind of multi-branch set-up isn't possible?

Upvotes: 1

Views: 2260

Answers (1)

Jesse Glick
Jesse Glick

Reputation: 25461

Install the Workflow: Multibranch plugin and create a multibranch workflow project. Each branch with a Jenkinsfile script will be built. Use checkout scm to check out sources.

Upvotes: 1

Related Questions