I've setup the Jenkins for the rails3 app to build the specs. One can find many posts via google on how to setup the build trigger on the github push.
But what I want is to build the new remote branch pushed to Github. e.g.
I've a repo origin/master
. I cloned the repo, created a new branch, did some commits and pushed that branch to origin git push -u origin new_branch
Now I want the Jenkins to build this newly pushed branch on the origin.
If the build is successful, then Jenkins should merge it into origin/master
automatically.
The Jenkins plugin has github, git plugin. But it requires to put the branch name. Instead I want to build the new_branch dynamically.
How can I setup such process?