Reputation: 2715
I started investigating the GitSCM class in Jenkins, so I see the parameters it takes in the constructor.
There's only one thing I don't understand:
The branches
parameter is of type: List<BranchSpec> branches
.
My question is: why does it take a list of branches? why would I checkout a list of branches in the checkout
step?
Upvotes: 1
Views: 699
Reputation: 7385
It is not the banches you want to checkout. These are the branches you want to build.
In jenkins.io documentation it says:
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
So if you just want master and feature1 branch tracked, use refs/heads/master, refs/heads/feature1
or let it blank for building all branches.
Upvotes: 1