The help for "Script Content" confirms that it can't be used to set environment variables for the build. But you should be able to specify the path to your shell script in "Properties File Path" instead.

On 6/12/2017 1:49 PM, Victoria Kozel wrote:
Hello,

I need to use a certain variable in my Shell Build Step that is figured in a shell script stored on the node. When I "source" this script in the same step in which I need the variable, it works. However sourcing it in the EnvInject step under Build Environment phase does not seem to transfer the variable to the Build Step. Here's how the job is configured:
X . Inject environment variables to the build process

Script Content: source /home/jenkins/setInventoryVar.sh



I can see at this point the output of the script in the console, yet the Build Step does not inherit a variable set in Inject Env.

Suggestions are greatly appreciated.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com <mailto:jenkinsci-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/dd621d0a-5a08-40a3-913c-54535f12cc5f%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/dd621d0a-5a08-40a3-913c-54535f12cc5f%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060
eric.p...@siemens.com
http://www.siemens.com/plm

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5dcea668-c8fc-eeff-567c-80cfd1d1d2bb%40cd-adapco.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to