[Buildbot-devel] access sendchange --property in an extend process.factory.BuildFactory

Jonathan Schedler jschedler at imvu.com
Mon Feb 27 16:13:33 UTC 2012


I see, Dustin.

I tried to get access to the properties in newBuild() using
request[0].master.db.change.getRecentChanges(10).  This got me close, but a
deferred is returned.  This deferred does fire a callback with the info I
am seeking, however I need a call that is synchronous.

As an alternative, I am using buildbot sendchange --project=my_flag_value
to convey the information I need and then I use
request[0].source.asDict().get('project','') to access its value in
newBuild().

My solution seems cheesy.  Is there an orthodox way to dynamically change
command parameters used in a buildstep based on which properties are set
using buildbot sendchange --property=key:value?  For example, I have a
build step that is essentially 'python compile.py' by default.  I want to
use buildbot sendchange --property=dryrun:true and change that buildstep to
be 'python compile.py --dryrun'

Jon



On Sun, Feb 26, 2012 at 5:09 PM, Dustin J. Mitchell <dustin at v.igoro.us>wrote:

> On Thu, Feb 23, 2012 at 8:28 PM, Jonathan Schedler <jschedler at imvu.com>
> wrote:
> > However, I have extend process.factory.BuildFactory and had overridden
> > newbuild().  In new build I want to see the value of my property.  I am
> > having hard time making this happen.
> >
> > Is this possible, and if so how can I do it?
>
> It is not -- properties are not available until the build is created -
> which is, of course, after newBuild returns.
>
> Dustin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20120227/dd2094d9/attachment.html>


More information about the devel mailing list