[JIRA] (JENKINS-41354) Git environment variables are not accessible

1 view
Skip to first unread message

deekshith24@gmail.com (JIRA)

unread,
Jan 24, 2017, 1:23:01 AM1/24/17
to jenkinsc...@googlegroups.com
Deekshith Kumar created an issue
 
Jenkins / Bug JENKINS-41354
Git environment variables are not accessible
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2017/Jan/24 6:22 AM
Environment: Jenkins ver. 1.639
git plugin 3.0.1
Priority: Blocker Blocker
Reporter: Deekshith Kumar

Below echo command is printing empty
echo "GIT_PREVIOUS_COMMIT:" $GIT_PREVIOUS_COMMIT
echo "GIT_COMMIT:" $GIT_COMMIT

output:
GIT_PREVIOUS_COMMIT:
GIT_COMMIT:

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 24, 2017, 6:40:01 AM1/24/17
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 24, 2017, 6:41:01 AM1/24/17
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-41354
 
Re: Git environment variables are not accessible

Please provide more details on the context where those environment variables are empty, and the steps you took to reach that context.

deekshith24@gmail.com (JIRA)

unread,
Jan 24, 2017, 10:02:01 AM1/24/17
to jenkinsc...@googlegroups.com

I m running above echo command in excute shell section . I am getting value for "echo $GERRIT_PROJECT " but not in above case.

deekshith24@gmail.com (JIRA)

unread,
Jan 30, 2017, 1:42:01 AM1/30/17
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 30, 2017, 8:14:01 AM1/30/17
to jenkinsc...@googlegroups.com

Since JENKINS-34477 is a "similar issue" and it is resolved, is this issue also resolved?

The user in JENKINS-34477 made a mistake in their job definition and was not using git as their SCM system. Have you made a similar mistake?

You mention that you're echoing $GERRIT_PROJECT and seeing a value in the execute shell step, but you didn't provide enough context for me to know the steps you've taken to reach that point, or the job type you were using when that shell step was executed.

Please provide a numbered set of steps that someone else can take which will show the problem, or provide a Jenkins job definition which shows the problem (as a config.xml file).

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 30, 2017, 8:45:01 AM1/30/17
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-41354
Since JENKINS-34477 is a "similar issue" and it is resolved, is this issue also resolved?

The user in JENKINS-34477 made a mistake in their job definition and was not using git as their SCM system.  Have you made a similar mistake?

You mention that you're echoing $GERRIT_PROJECT and seeing a value in the execute shell step, but you didn't provide enough context for me to know the steps you've taken to reach that point, or the job type you were using when that shell step was executed.

Please provide a numbered set of steps that someone else can take which will show the problem, or provide a Jenkins job definition which shows the problem (as a config.xml file).


I've confirmed that GIT_COMMIT is set in the shell environment for a [freestyle job|https://github.com/MarkEWaite/docker/blob/lts-with-plugins/ref/jobs/Bugs-Individual/jobs/JENKINS-41354-freestyle/config.xml] and a [multi-configuration job|https://github.com/MarkEWaite/docker/blob/lts-with-plugins/ref/jobs/Bugs-Individual/jobs/JENKINS-41354-multi-config/config.xml].

I have confirmed that GIT_PREVIOUS_COMMIT is *not* set in at least one of those cases, though since it was the first run of a job, there wasn't a "previous commit"

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 30, 2017, 10:10:01 AM1/30/17
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-41354
Since JENKINS-34477 is a "similar issue" and it is resolved, is this issue also resolved?

The user in JENKINS-34477 made a mistake in their job definition and was not using git as their SCM system.  Have you made a similar mistake?

You mention that you're echoing $GERRIT_PROJECT and seeing a value in the execute shell step, but you didn't provide enough context for me to know the steps you've taken to reach that point, or the job type you were using when that shell step was executed.

Please provide a numbered set of steps that someone else can take which will show the problem, or provide a Jenkins job definition which shows the problem (as a config.xml file).


I have confirmed that GIT_PREVIOUS_COMMIT is *not* set in at least one of those cases, though since it was the first run of a job, there wasn't a "previous commit"

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:33:52 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Cannot Reproduce
 
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages