|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[JIRA] (JENKINS-14097) Allow Script Path/Content to add/override environment variables for the build job
dave.ehrenber...@solipsys.com (JIRA) Thu, 14 Jun 2012 05:05:24 -0700
- [JIRA] (JENKINS-14097) Allow Script P... dave.ehrenber...@solipsys.com (JIRA)
- [JIRA] (JENKINS-14097) Allow Scr... dave.ehrenber...@solipsys.com (JIRA)
- [JIRA] (JENKINS-14097) Allow Scr... dave.ehrenber...@solipsys.com (JIRA)
- [JIRA] (JENKINS-14097) Allow Scr... dave.ehrenber...@solipsys.com (JIRA)
- [JIRA] (JENKINS-14097) Allow Scr... dave.ehrenber...@solipsys.com (JIRA)
- [JIRA] (JENKINS-14097) Allow Scr... dave.ehrenber...@solipsys.com (JIRA)
I use the bash built-in 'source' command which executes the script in the context of the current shell. For the purposes of this plugin, doing so will load any exported environment variables into the shell environment. Once the shell is closed, the variables exported into it are gone as well. This is why, if I execute 5 differed shell build steps, I must source the environment file in each build step.
As an example, if my script called environment.anything contains:
#!/bin/bash export MY_VARIABLE="Test Variable"