, , "Execute shell" script, , , . GIT_DESCRIBE / , .
, " Groovy script" . Groovy script . , .groovy script $WORKSPACE. , , - script, ($ WORKSPACE) .groovy script, GIT_DESCRIBE.
Groovy script
def sout = new StringBuilder()
def serr = new StringBuilder()
def proc = "$WORKSPACE/git-describe.sh".execute()
proc.waitForProcessOutput(sout, serr)
def map = [GIT_DESCRIBE: sout.toString()]
return map
git -describe.sh
#! /bin/bash
cd "${0%/*}"
echo `git describe`
GIT_DESCRIBE "Build name".
${ENV, var="GIT_DESCRIBE"}