0

We're using jenkins with the git plugin (github remote), and in the "branches to build" we specify "**", which builds any branch that was changed.

However, the "changes" screen displays only the git commits sha1 and commit message. Is there any simple way to add the branch name to the text? or even better, to the jenkins build ID?

Might be related to How to receive local Git branch name with Jenkins Git plugin?, but not sure how to use that info...

Community
  • 1
  • 1
ihadanny
  • 4,377
  • 7
  • 45
  • 76

1 Answers1

1

The answer is using Build Name Setter Plugin.

  1. Install Build Name Setter Plugin. Check here if you don't know how to install an jenkins plugin.
  2. In your Job Config page, scroll down to Build Environment section, set the build name like #${BUILD_NUMBER}_${GIT_BRANCH}

enter image description here

  1. After that, you can see branch name either in the build label or in the changes screen. enter image description here
mainframer
  • 20,411
  • 12
  • 49
  • 68