1

I use Jenkins file, How can I have the exact name of the current branch in my jenkinsFile, during a Pull Request?

The var BRANCH_NAME contains only something who start why 'PR-'

sab
  • 4,352
  • 7
  • 36
  • 60
  • already answered here https://stackoverflow.com/questions/42383273/get-git-branch-name-in-jenkins-jenkinsfile – Ram Nov 20 '17 at 10:27
  • the solution work in local, but return null when launched by jenkins – sab Nov 20 '17 at 15:00
  • Does this answer your question? [Get git branch name in Jenkins Pipeline/Jenkinsfile](https://stackoverflow.com/questions/42383273/get-git-branch-name-in-jenkins-pipeline-jenkinsfile) – cuh Mar 12 '20 at 13:30

0 Answers0