[Buildbot-devel] sourcing env vars from file

Tom Prince tom.prince at ualberta.net
Sat Nov 3 22:53:15 UTC 2012


David Tucker <david.tucker at schange.com> writes:

> Hi all, I have a master.cfg question.  Our existing build linux
> process requires developers to "source" a config script in their shell
> to set up the build environment, basically it's just a file with a
> bunch of "export" statements.  I can't figure out how to get this into
> our build factory.
>
> I've tried everything I can think of, the most obvious being:
>
> 	factory.addStep(Configure(command=["source","setEnv1.sh"]))  
>
> But that doesn't seem to work.

That doesn't work, since each command is run in a seperate process, and
(unless you pass a string instead of a list) the shell isn't involved at all.

> I can use env={} to set each env var individually but that seem
> problematic.  ( and there are lots to set ) I really want the
> buildslave to use the same setup that the developers use so that when
> it changes the buildbot will change as well.

I'll second the suggestion to make the buildbot process reproducible
outside buildbot. But another option is to make the list of environment
variables to set be contained in some sort of easily parsable file
format, and having that parsed by both a shell script and buildbot.

  Tom





More information about the devel mailing list