I'm currently checking out multiple branches (assume 4 branches) in a Jenkins job and trying to use the branch names of all branches checked out in a script.
I could achieve this in the case of subversion using Jenkins Environment Variables: SVN_BRANCH_n and SVN_URL_n (where n is the number of a branch).
However, this is not possible with GIT_BRANCH_n [Ex: $GIT_BRANCH_1, $GIT_BRANCH_2 etc.,] variable.
Can anyone please help me if there is a plugin/solution to have such variable for multiple Git branches in a Jenkins job?
Thanks in advance!