I\'m trying to use Jenkins file for all our builds in Jenkins, and I have following problem. We basically have 3 kind of builds:
for questions 2 you may be able to do
sh 'git branch > GIT_BRANCH' def gitBranch = readFile 'GIT_BRANCH'
since you're checking out from git