[Buildbot-devel] Access BuildSet IDs from a BuildStep

Tom Prince tom.prince at ualberta.net
Tue Jul 17 21:46:18 UTC 2012


Jorge Gonzalez <gjorge at google.com> writes:

> 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

More idiomatically, would be to have this code be the getRenderingFor
method on a class implementing IRenderable. (Unfortunately, this hasn't
been documented yet). There are some examples of this in
https://github.com/buildbot/buildbot/blob/master/master/buildbot/process/properties.py

  Tom




More information about the devel mailing list