[Buildbot-devel] Conditionally skipping build steps on codebase

Bruce Stephens bruce.stephens at isode.com
Sun Nov 11 13:28:18 UTC 2012


Mike Sorrenti <mikesorrenti at gmail.com> writes:

> I think you may be able to do this with doStepIf and the build's
> SourceStamp information. I'm not sure if a SourceStamp is created for
> every codebase, or only the one that has changed. Unable to check
> right now, unfortunately.

Success, thanks!

The doStepIf function is passed step, and step.build.requests has a list
of requests (I forget the class), for each request, request.sources is a
dict of SourceStamp objects (indexed by codebase), and in each, changes
is a list of changes.

So for the first request and for a codebase called 'one', checking
whether this list is empty or not tells you whether it affects the given
codebase:

  step.build.requests[0].sources['one'].changes

[...]





More information about the devel mailing list