[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage resolved as Not A Defect I take it back; I'd been mislead by my team as to how this had been set up and it turns out the Git plugin wasn't being used at this point in the build chain. Apologies for the noise. Jenkins / JENKINS-34477 Git plugin environment variables are not accessible Change By: jon cage Status: Reopened Resolved Resolution: Not A Defect Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage edited a comment on JENKINS-34477 Re: Git plugin environment variables are not accessible I just tried a rebuild after manually adding the following to the 'Execute Windows Batch Comman' section of the Jenkins config:{code:java}ECHO Jenkins WORKSPACE: %WORKSPACE%ECHO Jenkins Git Plugin GIT_COMMIT: %GIT_COMMIT%ECHO Jenkins Git Plugin GIT_BRANCH: %GIT_BRANCH%{code}...but I still don't see the output for the Git plugin variables whereas the Jenkins ones appear to work just fine :{code:java}ECHO Jenkins WORKSPACE: /Builds/workspaceECHO Jenkins Git Plugin GIT_COMMIT:ECHO Jenkins Git Plugin GIT_BRANCH:{code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage reopened an issue I just tried a rebuild after manually adding the following to the 'Execute Windows Batch Comman' section of the Jenkins config: ECHO Jenkins WORKSPACE: %WORKSPACE% ECHO Jenkins Git Plugin GIT_COMMIT: %GIT_COMMIT% ECHO Jenkins Git Plugin GIT_BRANCH: %GIT_BRANCH% ...but I still don't see the output: ECHO Jenkins WORKSPACE: /Builds/workspace ECHO Jenkins Git Plugin GIT_COMMIT: ECHO Jenkins Git Plugin GIT_BRANCH: Jenkins / JENKINS-34477 Git plugin environment variables are not accessible Change By: jon cage Resolution: Not A Defect Status: Resolved Reopened Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage updated an issue Jenkins / JENKINS-34477 Git plugin environment variables are not accessible Change By: jon cage Comment: I just tried a rebuild after manually adding the following to the 'Execute Windows Batch Comman' section of the Jenkins config:{code:java}ECHO Jenkins WORKSPACE: %WORKSPACE%ECHO Jenkins Git Plugin GIT_COMMIT: %GIT_COMMIT%ECHO Jenkins Git Plugin GIT_BRANCH: %GIT_BRANCH%{code}...but I still don't see the output:{code:java}ECHO Jenkins WORKSPACE: /Builds/workspaceECHO Jenkins Git Plugin GIT_COMMIT:ECHO Jenkins Git Plugin GIT_BRANCH:{code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage edited a comment on JENKINS-34477 Re: Git plugin environment variables are not accessible I just tried a rebuild after manually adding the following to the 'Execute Windows Batch Comman' section of the Jenkins config:{code:java}ECHO Jenkins WORKSPACE: %WORKSPACE%ECHO Jenkins Git Plugin GIT_COMMIT: %GIT_COMMIT%ECHO Jenkins Git Plugin GIT_BRANCH: %GIT_BRANCH%{code}...but I still don't see the output:{code:java}ECHO Jenkins WORKSPACE: /Builds/workspaceECHO Jenkins Git Plugin GIT_COMMIT:ECHO Jenkins Git Plugin GIT_BRANCH:{code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage edited a comment on JENKINS-34477 Re: Git plugin environment variables are not accessible I just tried a rebuild after manually adding the following to the 'Execute Windows Batch Comman' section of the Jenkins config: {code:java} ECHO Jenkins Git Plugin GIT_COMMIT: %GIT_COMMIT%ECHO Jenkins Git Plugin GIT_BRANCH: %GIT_BRANCH% {code} ...but I still don't see the output: {code:java} ECHO Jenkins Git Plugin GIT_COMMIT:ECHO Jenkins Git Plugin GIT_BRANCH: {code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage commented on JENKINS-34477 Re: Git plugin environment variables are not accessible I just tried a rebuild after manually adding the following to the 'Execute Windows Batch Comman' section of the Jenkins config: ECHO Jenkins Git Plugin GIT_COMMIT: %GIT_COMMIT% ECHO Jenkins Git Plugin GIT_BRANCH: %GIT_BRANCH% ...but I still don't see the output: ECHO Jenkins Git Plugin GIT_COMMIT: ECHO Jenkins Git Plugin GIT_BRANCH: Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title Mark Waite resolved as Not A Defect I believe you need to use DOS style references, surrounding the name of the environment variable with the percent character. When I did that, this was the job output: Started by user Mark Waite [EnvInject] - Loading node environment variables. Building remotely on coleen-pc2 (amd64-windows-10.0 authenticating-git windows-6.3 windows-10.0 6.3 amd64-windows windows 64bit amd64-windows-6.3 amd64) in workspace C:\J\workspace\JENKINS-34477 > C:\Program Files\git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > C:\Program Files\git\cmd\git.exe config remote.origin.url g...@github.com:MarkEWaite/jenkins-bugs.git # timeout=10 Fetching upstream changes from g...@github.com:MarkEWaite/jenkins-bugs.git > C:\Program Files\git\cmd\git.exe --version # timeout=10 using GIT_SSH to set credentials mwaite@mark-pc1 > C:\Program Files\git\cmd\git.exe -c core.askpass=true fetch --no-tags --progress g...@github.com:MarkEWaite/jenkins-bugs.git +refs/heads/*:refs/remotes/origin/* --depth=1 # timeout=1 > C:\Program Files\git\cmd\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > C:\Program Files\git\cmd\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 Checking out Revision 8b464e14423ad697547fad3797a3ba03504a47a3 (refs/remotes/origin/master) > C:\Program Files\git\cmd\git.exe config core.sparsecheckout # timeout=10 > C:\Program Files\git\cmd\git.exe checkout -f 8b464e14423ad697547fad3797a3ba03504a47a3 # timeout=10 > C:\Program Files\git\cmd\git.exe branch -a -v --no-abbrev # timeout=10 > C:\Program Files\git\cmd\git.exe branch -D master # timeout=10 > C:\Program Files\git\cmd\git.exe checkout -b master 8b464e14423ad697547fad3797a3ba03504a47a3 > C:\Program Files\git\cmd\git.exe rev-list 8b464e14423ad697547fad3797a3ba03504a47a3 # timeout=10 [JENKINS-34477] $ cmd /c call C:\Users\Coleen\AppData\Local\Temp\hudson8221419918577078562.bat C:\J\workspace\JENKINS-34477>echo GIT_COMMIT is 8b464e14423ad697547fad3797a3ba03504a47a3 GIT_COMMIT is 8b464e14423ad697547fad3797a3ba03504a47a3 C:\J\workspace\JENKINS-34477>echo GIT_BRANCH is origin/master GIT_BRANCH is origin/master C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_COMMIT: 8b464e14423ad697547fad3797a3ba03504a47a3 Jenkins Git Plugin GIT_COMMIT: 8b464e14423ad697547fad3797a3ba03504a47a3 C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_BRANCH: origin/master Jenkins Git Plugin GIT_BRANCH: origin/master C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_PREVIOUS_COMMIT: 8b464e14423ad697547fad3797a3ba03504a47a3 Jenkins Git Plugin GIT_PREVIOUS_COMMIT: 8b464e14423ad697547fad3797a3ba03504a47a3 C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_PREVIOUS_SUCCESSFUL_COMMIT: 8b464e14423ad697547fad3797a3ba03504a47a3 Jenkins Git Plugin GIT_PREVIOUS_SUCCESSFUL_COMMIT: 8b464e14423ad697547fad3797a3ba03504a47a3 C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_URL: g...@github.com:MarkEWaite/jenkins-bugs.git Jenkins Git Plugin GIT_URL: g...@github.com:MarkEWaite/jenkins-bugs.git C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_URL_1: Jenkins Git Plugin GIT_URL_1: C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_URL_2: Jenkins Git Plugin GIT_URL_2: C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_URL_3: Jenkins Git Plugin GIT_URL_3: C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_AUTHOR_NAME: Mark Waite - Jenkins Jenkins Git Plugin GIT_AUTHOR_NAME: Mark Waite - Jenkins C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_COMMITTER_NAME: Mark Waite - Jenkins Jenkins Git Plugin GIT_COMMITTER_NAME: Mark Waite - Jenkins C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_AUTHOR_EMAIL: mark.earl.wa...@gmail.com Jenkins Git Plugin GIT_AUTHOR_EMAIL: mark.earl.wa...@gmail.com C:\J\workspace\JENKINS-34477>ECHO Jenkins Git Plugin GIT_COMMITTER_EMAIL: mark.earl.wa...@gmail.com Jenkins Git Plugin GIT_
[JIRA] [git-plugin] (JENKINS-34477) Git plugin environment variables are not accessible
Title: Message Title jon cage created an issue Jenkins / JENKINS-34477 Git plugin environment variables are not accessible Issue Type: Bug Assignee: Mark Waite Components: git-plugin Created: 2016/Apr/27 4:32 PM Environment: Host machine: Windows 7 Jenkins ver. 1.655 Git plugin ver: 2.4.2 MSBuild ver: 4.0.30319.17929 Labels: plugin jenkins windows git build Priority: Blocker Reporter: jon cage We have a Jenkins job that calls MSBuild as an 'Execute Windows batch command' with a call along these lines: \Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe "C:\Builds\workspace\MySoftwre.sln" /p:Configuration=Release I have a post-build event that we intended to use to publish results including the SHA-1 from our Git repo. It would appear that the Git plugin isn't forwarding that information though because when we try and output the following: ECHO Jenkins Git Plugin GIT_COMMIT: $(GIT_COMMIT) ECHO Jenkins Git Plugin GIT_B