[Buildbot-devel] Using environment on the slave side

Stefan Seefeld seefeld at sympatico.ca
Thu Sep 28 23:48:20 UTC 2006


Mateusz Loskot wrote:
> Stefan Seefeld wrote:
>> Mateusz Loskot wrote:
>>
>>> I set a requirement for all buildslave instances, to define environment
>>> variable BUILHOME - absolute path to buildslave directory.
>>> The idea is to make build steps working on all buildslaves,
>>> all machines and systems *without* much configuring them,
>>> just one env variable.
>> As it is important to control the development / runtime environment seen by
>> the slaves, I simply make sure the environment that is seen during slave process
>> creation is what I need it to be.
> 
> Yes, that's why I set BUILDHOME on every slave, manually or
> using buildbot.tac, no matter how but buildlsave env includes
> this variable
> 
> But now, I need to make buildslave using it.
> For example, how can I tell slave:
> 
> "Read value of BUILDHOME variable in your env and assign it to PATH,
> so buildslave's PATH will look like PATH=$BUILDHOME"
> 
> Just an example of my idea.

Well, if there is a simple mapping from BUILDHOME to other variables,
write a python function that implements it and run it from all your slave
buildbot.tac files (they are just python scripts, you know...).

>> This can be done by modifying the respective slave
>> buildbot.tac files. Alternatively, you could enforce a particular way to start twistd,
>> such as by means of a Makefile that controls all environment variables.
> 
> This is about setting particular env variable, but as I'm trying to
> explain above, I don't know how to use it on slave object side.

Well, I'm talking about the *slave* twistd processes, too. :-)
It's one thing to pass particular variables from the master to all slaves,
but another to really control the slaves entirely, i.e. make sure no accidental
variables slip in during initialization, no matter how benign they may appear.

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...




More information about the devel mailing list