[Buildbot-devel] slave os.environ['HOME']
Ryan Raasch
ryan.raasch at gmail.com
Thu Jun 25 13:14:34 UTC 2009
Hello,
Wow. I thought this would be easier. I will be trying to maintain a
build system with several toolchains. Therefore, the source will be
build out-of-tree. Therefore, for each slave, i do not want to have an
svn repository for each. It would be cleaner to have one repos checkout
and x number of build folders.
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).
The two solutions recommeneded earlier were WithProperties and
RemoteCommand.
My experiences.
1. I have tried WithProperties, but it seems class SVN cannot work with
it (or i have the syntax incorrect). Also, it would be easier to read
write to get the property once and use it throughout the script (i.e.
prepend it to directories).
2. RemoteCommand looks more easier and generic, but how to use it needs
a Log object, which is another class (i may be wrong). So i need to make
another class just to get the output ?
Sorry for the noise on the mailing list for my trivial issues. My python
and buildbot experience is slow.
Ryan
Steve 'Ashcrow' Milner wrote:
> On 23/06/09 14:08 +0200, Ryan Raasch wrote:
>> I am trying to get the "home" shell variable from the remote machine.
>>
>> When starting the buildbot master, the os.environ['HOME'] returns the
>> master's home, which i do not want. I have not been able to find the
>> function call in the source.
>>
>> How do i get the os.environ['HOME'] from the slave, (at runtime)?
>>
>>
>> Thanks,
>> Ryan
>
> You could probably use buildbot.steps.transfer.RemoteCommand ..
>
> """
> I represent a single command to be run on the slave. I handle the
> details of reliably gathering status updates from the slave (acknowledging
> each), and (eventually, in a future release) recovering from interrupted
> builds. This is the master-side object that is known to the slave-side
> L{buildbot.slave.bot.SlaveBuilder}, to which status updates are
> sent.
> """
>
> or write a command that simply runs what you want on the slave.
>
> I hope that helps. Let me know if that doesn't answer your question.
More information about the devel
mailing list