[workflow plugin] Accessing info about a SCM operation

31 views
Skip to first unread message

Christopher Barnes

unread,
Feb 11, 2015, 7:16:41 PM2/11/15
to jenkins...@googlegroups.com
Hello–

With the workflow plugin, after you've performed a SCM step (e.g. with "git" or "checkout"), is there an easy way to get information about the revision that was just checked out? Specifically, I'm doing a checkout from Git, and I need to know what the commit hash is that the job pulled. In a normal job, this would be injected as the GIT_COMMIT environment variable, but in the workflow script that doesn't appear to be available.

Thanks, and sorry if I'm missing something obvious here. 

–Chris

Jesse Glick

unread,
Feb 25, 2015, 6:27:48 PM2/25/15
to jenkins...@googlegroups.com
On Wednesday, February 11, 2015 at 7:16:41 PM UTC-5, Christopher Barnes wrote:
With the workflow plugin, after you've performed a SCM step (e.g. with "git" or "checkout"), is there an easy way to get information about the revision that was just checked out? Specifically, I'm doing a checkout from Git, and I need to know what the commit hash is that the job pulled. In a normal job, this would be injected as the GIT_COMMIT environment variable, but in the workflow script that doesn't appear to be available.

Reply all
Reply to author
Forward
0 new messages