[Buildbot-devel] how to use environment variable in build step

Hendryk Bockelmann bockelmann at dkrz.de
Thu Nov 11 11:50:14 UTC 2010


I am using a simple BuildFactory to perform some shell scripts on my 
build-slave, ie. the master.cfg looks like:

my_fac = factory.BuildFactory()
my_fac.addStep(shell.ShellCommand(description='run test 1',
                                   command=["/home/user/scripts/foo.sh", 
"--with-option=1"],
                                   workdir="/tmp/buildbot"))

To be more flexible in my builds, I would like to replace the absolute 
paths in the ShellCommand and use s.th. like

my_fac = factory.BuildFactory()
my_fac.addStep(shell.ShellCommand(description='run test 1',
                                   command=["$HOME/scripts/foo.sh", 
"--with-option=1"],
                                   workdir="$WORK"))

where the HOME and WORK environment vars are already setup on each 
buildslave ... but unfortunately the environment vars do not get 
expanded when the build runs. So where is my mistake?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20101111/fef9b960/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5844 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://buildbot.net/pipermail/devel/attachments/20101111/fef9b960/attachment.bin>


More information about the devel mailing list