[Buildbot-devel] Global Environment
Mark Roddy
markroddy at gmail.com
Thu Dec 11 18:48:59 UTC 2008
> 1) I cannot add an environment variable without explicitly running a command
I don't think there's anything you can do about this except manually
set the variable on the slave
> 2) The INSTALL_PATH variable is not existent for the rest of the steps
Easy way to do this is to create a single dictionary and pass it in to
each of your steps
> 3) The $NOWINSTALLPATH variable is treated as a string instead of
> actually using a previously declared variable
I believe variable expansion is performed by the shell, so I wouldn't
expect it to be expanded. If you use my suggestion for #2 you can
form this value yourself.
> 4) `svnversion` is also treated as a string and does not run as a command
See #2. I believe you can accomplish this using build properties, but
I'm not entirely sure.
-Mark
On Thu, Dec 11, 2008 at 1:35 PM, Razvan Lupusoru
<lupusoru at cse.ohio-state.edu> wrote:
> Hello, I want to have global environment variables that exist all
> throughout the life of a factory.
> For example, I am trying to set INSTALL_PATH as a variable that I want
> to use later in my code. The way I am trying to do this is:
>
> compileAndBuildFactory.addStep(ShellCommand(description='Checking
> environment', command=["/bin/env"], env={'INSTALL_PATH':
> '/srv/export/testing/$NOWINSTALLPATH/`svnversion`'}))
>
> There are four problems with this solution:
> 1) I cannot add an environment variable without explicitly running a command
I don't think there's anything you can do about this except manually
set the variable on the slave
> 2) The INSTALL_PATH variable is not existent for the rest of the steps
> 3) The $NOWINSTALLPATH variable is treated as a string instead of
> actually using a previously declared variable
> 4) `svnversion` is also treated as a string and does not run as a command
>
> Ideas on how I can fix any of these problems?
>
> Thank you,
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
More information about the devel
mailing list