How to get output of 'git describe' into Jenkins build name -


what's best (or any!) way put output of command in jenkins build name?

i'd put output of git describe command build name of jenkins job.

i've installed build-name-setter plugin hopes of setting build name like:

${env, var="git_describe"} 

i don't know how set $git_describe before name set! i've tried using envinject plugin. way dynamically set environment variables use groovy script. work well, except job running on remote slave , groovy script (apparently) running on master.

if need "describe" data (i.e. can't use existing $git_branch or $git_commit environment variables), add "execute shell step" with:

echo git_describe=$(git describe) > git.properties 

then after that, add envinject build step injects properties git.properties file.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -