[Buildbot-devel] Buildbot workdir issues

Simon Fraser smfr at mac.com
Thu Apr 19 20:03:43 UTC 2007


On Apr 17, 2007, at 12:24 AM, Brian Warner wrote:

> Simon Fraser <smfr at mac.com> writes:
>
>> 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")
>
>> 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.
>
> Hm. One quick answer I'd throw out is to add an explicit 'mkdir'  
> step. But
> that makes me wonder how you get this thing bootstrapped, if you  
> have to have
> a valid SVN working directory before you can run svn_bless?
>
> I'm also tempted to recommend using mode='copy', in the hopes that  
> it would
> keep your SVN working directory around from one build to the next,  
> and reduce
> the need to get credentials cached a lot. But the same bootstrap  
> problems
> exists.
>
> If it were easy to replace the copy of 'svn' you're running (like, if
> step.SVN took an svnbin= argument), then you could point it at a  
> separate
> script which added the username/password arguments without showing  
> what they
> were to stdout (and thus into the logs). But we don't. A really  
> gross hack
> would be to run that buildslave with a special PATH that made it see a
> completely different 'svn' than everyone else, inside which you  
> could add
> those arguments.
>
>> Is there some way to ensure that the workdir is created before any
>> steps run?
>
> Apart from an explicit 'mkdir' ShellCommand, no, not really. It's  
> kind of
> optimized for the VC-checkout-creates-workdir model.

So I guess I'm out of luck here.

How do other people avoid svn passwords showing up in their buildbot  
logs?

Simon





More information about the devel mailing list