[Buildbot-devel] accessing slave homedir in master?

Thomas, JMH (Jens) j.m.h.thomas at dl.ac.uk
Thu Sep 18 21:28:07 UTC 2008


I hit a similar problem trying to get the full path to the working directory on the slave.

I was able to get it to work for me by running a command to set a property, and then using the property in a subsequent command, as in:

f.addStep(SetProperty(command="pwd", property="workdir"))
f.addStep(
shell.ShellCommand(
command=["echo", WithProperties("%(workdir)s")"]
)
)

I haven't tried it, but it might work if you run the command "echo ~/" or similar?

Hope that helps!

Jens


-----Original Message-----
From: buildbot-devel-bounces at lists.sourceforge.net on behalf of Jimmy John
Sent: Thu 9/18/2008 9:25 PM
To: Neil Hemingway
Cc: buildbot-devel at lists.sourceforge.net
Subject: Re: [Buildbot-devel] accessing slave homedir in master?
 
I am trying to run a make, make install, make test etc on the slave....

for make install, i need to specify a dir to install into , which is why I wanted a way to obtain the HOME dir of the slave...

I cannot use dir like /opt as my user does not have permissions to write into that dir (I could use sudo but then my LD_LIBRARY_PATH gets masked which leads to all kinds of grief )

Jimmy




----- Original Message ----
From: Neil Hemingway <neil.hemingway at googlemail.com>
To: Jimmy John <jimmyj_in at yahoo.com>
Cc: buildbot-devel at lists.sourceforge.net
Sent: Thursday, September 18, 2008 1:21:31 PM
Subject: Re: [Buildbot-devel] accessing slave homedir in master?


What are you trying to achieve?

Steps execute on the slave with their working directory being the top level directory of the code checkout.


2008/9/18 Jimmy John <jimmyj_in at yahoo.com>

Is there any way to run a command and pass as argument the slave's home dir...

eg. if i want to run a command to create a dir at the slave home e.g.

f.addStep(shell.ShellCommand(name="creating new dir",
                             haltOnFailure=True,
                             command=["mkdir", "-p", "$HOME/xxx_buildbot/%s" % dir_builder_name],
                             workdir="build/splunk/current",
                             description=["creating new dir"],
                             descriptionDone=["created new dir"],
                             timeout=120))


does not give me what i want....it creates a dir called '$HOME'...any way i can get the environment variables expanded before they  get used....



mkdir -p $HOME/xxx_buildbot/Slave2_-_SunOS_-_perforce_nightly_tests
 in dir /home/slave/xxxtest/perforce_nightly_tests/run_data/slave2/build/xxx/current (timeout 120 secs)
 watching logfiles {}

 argv: ['mkdir', '-p', '$HOME/xxx_buildbot/Slave2_-_SunOS_-_perforce_nightly_tests']




Thanks
Jimmy




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Buildbot-devel mailing list
Buildbot-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/buildbot-devel


      






More information about the devel mailing list