Jenkins GitHub Plugin Inverse Branches

I have a question in on the plugins page, but this seems to be a much more active place for Jenkins support.

When a change is pushed to any branch the job will run, and merge into the develop branch, but approx 20 seconds later the job will notice the merge into develop and trigger the job again. This should not happen because develop is in the branches to build (with inverse choosing stragety). This also happens when a change it pushed to master or release, which also should be excluded. If there is a merge failure then the job will start a never ending loop trying to merge the branches until the conflict is manually resolved.

I have also tried to exclude a specific user from triggering builds, also to no effect.

I am beginning to assume that the Github plugin does not respect the choosing strategy or the other git plugin options.

Hopefully the below information is all that is needed to help me wrap my head around this issue.

GitHub Plugin                => 1.5
GitHub API Plugin            => 1.40
GitHub Pull Request Builder  => 1.7
GitHub Authentication Plugin => 0.13.1
Jenkins GIT Plugin           => 1.3.0
Jenkins GIT client Plugin    => 1.0.5

Interesting Configuration options from build

Branches to build


Excluded Users


Merge options

✓ Merge before build
Branch to merge to

Disable submodule processing ✓

Choosing stragety


Build Triggers

✓ Build when a change is pushed to github
✓ Poll SCM

Git Polling Log

Polling has not run yet.

Github Hook Log

Started on Apr 30, 2013 3:53:14 PM
Using strategy: Inverse
[poll] Last Built Revision: Revision bde1981da849dbfb2fd93aac4de05fd5a832043b (origin/ach)
Fetching changes from the remote Git repositories
Fetching upstream changes from origin
Polling for changes in
Seen branch in repository origin/develop
Seen branch in repository origin/feature-228
Seen branch in repository origin/feature-249
Seen branch in repository origin/master
Seen branch in repository origin/release
Done. Took 1.4 sec
Changes found


It looks like you've got two problems here.

  1. The branches you don't want to build are being built.
  2. You're seeing some funky merging behaviour (probably as a result of the above point).

I think your diagnosis is correct - I am beginning to assume that the Github plugin does not respect the choosing strategy or the other git plugin options.

I've had problems with the various GitHub plugins in the past too. They have some nice configuration options and can do some clever things but ultimately can be a bit flaky. I strongly believe that there should be absolutely no place for flakiness in a CI pipeline (as it will lead to a lack of trust in it).

In my opinion you cannot go wrong if you strip everything back to basics. Use the Jenkins Git plugin and treat GitHub as you would any Git repository. Set up SSH or similar (useful help article here) and a decent polling interval and you shouldn't run into any problems!

I have set up hundreds of Jenkins jobs in this manner for my organisation which uses private GitHub repositories. Hope this helps.

Need Your Help

how do i go about debugging this?

ruby-on-rails ruby debugging localhost

I just recently started this ruby on rails tutorial to kick off my new adventure into a new language and following the tutorial I got stuck. After I edited my index.html.erb file to what the tutori...

Ensemble model of Neural Network with Boosting in R

r neural-network adaboost boosting

I have a simple neural network model and I wanted to apply boosting on top of it . I have tried using Ada and Adabag package of R but they are mostly used for trees. Is there any approach for creat...