[Buildbot-devel] No "build" directory if first BuildStep is not a checkout

Brian Warner warner-buildbot at lothar.com
Sun Jul 8 01:46:25 UTC 2007


"Greg Ward" <gerg.ward+buildbot at gmail.com> writes:

> Presumably there's an implicit, accidental assumption that *any* build
> factory will include an official checkout step.

Yes, that is an assumption that the buildbot makes. At least, the use case
that I anticipated would be most common was the "checkout; make; make test"
one, in which the workdir is created by the checkout step and used by the
rest.

If you're using something other than a checkout to create your source tree,
you could either arrange for that step (tarball unpacking or whatever) to
move the results into "workdir", or you could set workdir= on all the other
steps to accomodate whatever directory *is* created. I recommend putting all
the source in a subdirectory of the builder's basedir rather than in the
basedir directly: that makes it a lot easier to clean up afterwards.

You can also change the default workdir for all Steps in a given Build by
arranging for the Build's .workdir attribute to be something special: the
best way to accomplish this is to subclass Build and then set your
BuildFactory to use the new class:

 class MyBuild(buildbot.process.base.Build):
     workdir = "special"

 f = factory.BuildFactory()
 f.addStep(...)
 f.buildClass = MyBuild

> Is this a known bug?  Or should I prepare a more thorough bug report
> with reproduction and all that?

I'm not sure I'd consider it a bug, but I certainly agree it's
under-documented. I'd happily accept a patch to make it clear what this
assumption is, why it exists, and what can be done when your build process
doesn't fit.

thanks,
 -Brian




More information about the devel mailing list