Jenkins GitHub Plugin builds All Branches on First Push

64 views
Skip to first unread message

Konrad Slepoy

unread,
Apr 6, 2015, 12:14:52 PM4/6/15
to jenkins...@googlegroups.com
I am configuring our system to build when a change is pushed to github. However, on the first push made by a user, all branches build. Is there a way to make only changed branches build? I don't want every branch to build on a user's first connection between their github and their jenkins.

Konrad Slepoy

unread,
Apr 6, 2015, 4:36:36 PM4/6/15
to jenkins...@googlegroups.com
HELP!!!!!

jpd4nt

unread,
Apr 7, 2015, 2:45:26 PM4/7/15
to jenkins...@googlegroups.com
Hi Konrad.

What version of jenkins are you using?
What version of github plugin are you using?

How have you get git configured for the project?

Mark Waite

unread,
Apr 7, 2015, 4:14:44 PM4/7/15
to jenkins...@googlegroups.com
If you have configured git to build all branches (branches to build empty or * or */* or origin/*), then you've asked that it build all branches.  If a branch has not been built and changes are detected, then that branch will be scheduled to build.

If you don't want certain branches built (ever), you probably need to adjust your definition of "branches to build" to exclude those branches which you never want to build.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a8a038dd-d951-4887-9da8-b027438edb1e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite

Konrad Slepoy

unread,
Apr 8, 2015, 11:09:10 AM4/8/15
to jenkins...@googlegroups.com
Hi, I set branches to build to be empty. It works fine, just for some reason on the first run of the jenkins job(as in the very first time Build #1 is executed) it assumes that all branches have been changed even when I only push to one branch. How do I fix that? I only want it to build changed branches(which it does on all builds except for the first where it builds all branches even though none of them have been pushed to in the commit that triggered the build).
Reply all
Reply to author
Forward
0 new messages