Jenkins Git/GitHub plugin builds random branches

266 views
Skip to first unread message

seanh

unread,
Apr 3, 2012, 5:56:21 AM4/3/12
to jenkins...@googlegroups.com
Hey, this has happened to me twice on two different Ubuntu 10.04 servers
running a fresh install of Jenkins 1.457.

I install the Git and GitHub plugins and configure my new Jenkins job to
build when it receives a push notification from GitHub. In the job
config I leave "Branches to build - Branch Specifier (blank for
default):" blank, which sets the value to **, which according to the
help means "all branches will be examined for changes and built."

What happens is that every time a build starts (whether started by a
GitHub notification, periodic timer, or manually) it picks a random
branch and builds that. Different branch every time. No relation to
which branches have changed recently in the GitHub repo.

Our GitHub repo has over 200 branches on it, most of them old branches
that haven't changed in ages.

My theory is that the new job sees every branch as new/changed and has
to build each branch once before it will settle down and start building
only the changed branch.

Does anyone else know what might be going wrong? Will building 200
branches fix the problem? Might there be any other way around it?

I'm currently having it build every 10 mins to see if it will eventually
settle down.

Thanks

Wannes Sels

unread,
Apr 3, 2012, 8:06:26 AM4/3/12
to jenkins...@googlegroups.com
Your theory is correct. The git-plugin will list every branch revision, filter out non-top revision (branches that are fully merged in another branch) and then build them one by one, oldest commit first.
Once you've built all there is to build, only changes will build.

Maybe you could consider excluding branches that don't need to be built, perhaps by moving them so that you can exclude them by name.
Reply all
Reply to author
Forward
0 new messages