Is there an easy way to find out which branch triggered a build process in Jenkins?
I am using the Jenkins GitHub plugin and GitHub Webhooks.
Instead of setting up a CI Job for each Branch I want to create a central script that will handle this automatically.
Any Ideas?
Cheers!
i had a look into the source and it looks like the GitHub plugin uses the Git plugin under the hood: http://wiki.hudson-ci.org/display/HUDSON/Git+Plugin
if that’s the case, you should be able to use the env-var
GIT_BRANCH