Sure. The variable named GIT_BRANCH expands to the name of the branch that was built (from the Git plugin).
Then you could use the Conditional Build Step plugin<https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin> to match the branch to a string and execute build steps based on that match. Curtis On Wed, Apr 9, 2014 at 11:43 AM, Maneesh M P <[email protected]>wrote: > Is there a way I can know the git branch which jenkins commenced the job > on? > If then based on that value can I kick on different pipeline jobs ? ie, > for master branch, one pipeline and release branch another ? > > Thanks, > M > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
