I have 3 Git branches, master, br2, and br3. I have 3 Jenkins jobs; each one clones the same repo but checks out a different branch. My understanding is that with the below command (http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/) in the post-receive hook it should trigger Jenkins to start the job for the branch the push was done on.
curl http://smfosbuild:8080/git/notifyCommit?url=git@vfilvgit2:scmtest.git
Changes made on br2 and pushed, the correct Jenkins job will start. But pushes for changes made on master or br3 will not cause the associate jobs to start.
I also have the email trigger active and I get an email for all pushes indicating the correct branch. So the post-receive hook is getting the correct info about the branch which has changed. Any ideas is my command above is incorrect or is there some setting in my Jenkins config I am missing?