[Buildbot-devel] Properties objects
Greg Ward
gerg.ward+buildbot at gmail.com
Wed Feb 11 13:42:54 UTC 2009
On 10 February 2009, Ian Peters-Campbell said:
> If in an extended class I want to pass a custom Properties object to a
> BuildRequest constructor, is Properties.update the correct way to do that,
> like so:
>
> d = {}
> d['f'oo'] = bar
> d['baz'] = quz
> p = Properties()
> p.update(d, "MY STUFF")
>
> request = BuildRequest(reason, source, builder, p)
Disclaimer: I have only read the code and scanned the docs, not
actually tried this (yet). But it looks to me as if you could also do
that in your master.cfg:
c['properties'] = { 'foo': bar, 'baz': qux }
and then the 'source' of those properties will be set automatically.
Depends on how static your property values are, of course. I have
properties for an external build ID and build label, so those will
have to set when I launch each build. Luckily I have custom code for
that (reads a record from our build queue and turns it into a Buildbot
BuildRequest), so it looks fairly straightforward. (Fingers crossed.)
Greg
More information about the devel
mailing list