github - What's a simple way to add the git branch in jenkins "changes" screen? -


we're using jenkins git plugin (github remote), , in "branches build" specify "**", builds branch changed.

however, "changes" screen displays git commits sha1 , commit message. there simple way add branch name text? or better, jenkins build id?

might related how receive local git branch name jenkins git plugin?, not sure how use info...

the answer using build name setter plugin.

  1. install build name setter plugin. check here if don't know how install jenkins plugin.
  2. in job config page, scroll down build environment section, set build name #${build_number}_${git_branch}

enter image description here

  1. after that, can see branch name either in build label or in changes screen. enter image description here

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -