I am trying to get more GIT commit information into a HipChat room.
I see there are a number of GIT variables that can be used in jenkins. I am working in the Execute Shell step of a job.
These work:
echo "${GIT_BRANCH}"
echo "${GIT_URL}"
echo "${GIT_COMMIT}"
These do not:
echo "${GIT_COMMITTER_EMAIL}"
echo "${GIT_COMMITTER_NAME}"
echo "${GIT_AUTHOR_EMAIL}"
echo "${GIT_AUTHOR_NAME}"
echo "${GIT_USER}"
Question 1: how come the vars above don't work?
This works:
git show --name-only
Question 2: How come I cant do Foo = "git show --name-only" And use Foo else where in the job, ie- send to HipChat?
I see there is a plugin envInject. But this is to write to a file in the workspace doing the execute shell step, then read from that file. This seems to be a bit overkill for what I am trying to do.
Question 3: is the envInject my only option?