[Buildbot-devel] Access BuildSet IDs from a BuildStep

Jorge Gonzalez gjorge at google.com
Tue Jul 10 16:23:58 UTC 2012


Thanks Tom. Your suggestion pointed me in the right direction. I just
learned about advanced property
interpolation<http://buildbot.net/buildbot/docs/0.8.6/full.html#advanced-property-interpolation>
which
seems to be enough for what I need to do.

For the benefit of future readres, this is the function I used to extract
the highest Buildset ID from all requests', as of 0.8.6:

def HighestBuildset(props):
  b = props.getBuild()
  max_req = max(b.requests, key=lambda r: r.bsid)
  return max_req.bsid

Jorge


On Tue, Jul 3, 2012 at 8:19 PM, Tom Prince <tom.prince at ualberta.net> wrote:

> Jorge Gonzalez <gjorge at google.com> writes:
>
> > Within a BuildStep, I would like to be able to compute and use the
> highest
> > buildset ID associated with any of the BuildRequests included in the
> > current Build.
>
> The best way to do this is to write an IRenderable to get this
> information. Or if you are using trunk, perhaps extending Interpolate to
> expose this.
>
>   Tom
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20120710/0174d50b/attachment.html>


More information about the devel mailing list