I\'ve create a jenkins pipeline and it is pulling the pipeline script from scm. I set the branch specifier to \'all\', so it builds on any change to any bra
all
A colleague told me to use scm.branches[0].name and it worked. I wrapped it to a function in my Jenkinsfile:
scm.branches[0].name
def getGitBranchName() { return scm.branches[0].name }