[Buildbot-devel] Buildbot workdir issues

Simon Fraser smfr at mac.com
Sat Apr 7 06:36:14 UTC 2007


I have a build factory that is configured something like this:

myBuildFactory = factory.BuildFactory()
myBuildFactory.addStep(step.ShellCommand, command=["/usr/local/ 
buildbot/svn_bless"])
myBuildFactory.addStep(step.SVN, mode='update', svnurl='https://svnrepo.example.com/svn/root/')
myBuildFactory.addStep(step.Compile, command="make")

where the svn_bless script is a script that does an svn info
with an explicit username and password in order to get svn login
credentials cached. (If there's a better way to do this without
having svn login details show up in logs, I'd be glad to hear it.)

The problem is that the svn step starts by blowing away the 'build'
dir (i.e. the workdir):

starting svn operation
rm -rf /usr/local/buildbot/foopy/full/build

so if that svn operation fails, I'm left without a workdir.

This means that the ShellCommand that runs next time tries to run
the command in a non-existent directory:

/usr/local/buildbot/bless_svn
  in dir /usr/local/buildbot/foopy/full/build (timeout 1200 secs)
...
Traceback (most recent call last):
   File "/opt/local/lib/python2.4/site-packages/twisted/internet/ 
process.py", line 749, in __init__
     os.chdir(path)
OSError: [Errno 2] No such file or directory: '/usr/local/buildbot/ 
foopy/full/build'

Is there some way to ensure that the workdir is created before any  
steps run?

I'm running buildbot 0.7.4.

Thanks
Simon





More information about the devel mailing list