[Buildbot-devel] slave os.environ['HOME']

Dustin J. Mitchell dustin at zmanda.com
Thu Jun 25 14:23:30 UTC 2009

On Thu, Jun 25, 2009 at 9:14 AM, Ryan Raasch<ryan.raasch at gmail.com> wrote:
> To do this, though, i need to find the HOME directory on the slave. I am
> not that great with python (like it a lot, but moreless newbie).

Maybe you could back up a bit and think about why you need this?  I
don't really understand your description.  Do you just need to find a
common place from which to access the source code, without copying it
into each build dir?

The problem is that, when the master.cfg is parsed, the slaves aren't
connected yet.  So there's absolutely no way to get a value from the
slaves into a local variable.

You're right that SVN doesn't accept properties, because it is
intended to run as the first step.

If my guess is correct, then you don't want to use the SVN step in
your builders (because you don't want to do a checkout for each
builder).  Instead, you'll need to find some way to atomically update
your common repository (or a shell command that uses some kind of
locking to prevent simultaneous updates?) on each buildslave.  If you
can, just make that common repository appear in the same place on
every slave.  Otherwise, since you're using a shell script to update
the repo, just use $HOME in that shell script.  Then each buildfactory
starts with this "update-the-common-repo" step, probably followed by
an 'rm -rf foo; mkdir foo' to clean out the build directory, followed
by the regular steps for your build.


Open Source Storage Engineer

More information about the devel mailing list