[Buildbot-devel] Taking custom properties from force build webpage

Bailey, Darragh dbailey at hp.com
Tue Jun 9 18:37:34 UTC 2009


 

> -----Original Message-----
> From: Al Nikolov [mailto:a.nikolov at drweb.com] 
> Sent: 05 June 2009 12:13
> To: buildbot-devel at lists.sourceforge.net
> Subject: Re: [Buildbot-devel] Taking custom properties from 
> force build webpage
> 
> Todd Whiteman wrote:
> 
> > I found an example master.cfg that uses a custom web page handler to
> > enable custom properties:
> >
> http://src.chromium.org/viewvc/chrome/trunk/tools/buildbot/scr
> ipts/master/chromium_status.py?view=markup&pathrev=13607
> > 
> > Not sure if that is the best approach but it seems to work.
> 
> Recently, i was looking for another way to handle custom 
> build properties
> set on 'Force build' pages, and asked here about how to get the Reason
> field content in a buildstep, but nobody answered.
> 
> I think about something like that:
> 
>   Reason: 'This builder has mode=update, but right now i need a full
> checkout, so i set source:checkout, and also i want g++ -g, so please
> debug:yes. When finished, it should close #999864 bug'
> 
> Then, a very simple custom buildstep (in the begining of most 
> build fabrics)
> should parse the 'Reason' field and set a number of custom 
> build properties
> to following steps:
> 
> { 'source' : 'checkout', 'debug' : 'yes', 'closes' : [ 999864 ] }
> 
> Then you can imagine custom buildsteps wich do many useful things.
> 
> But, again, i cannot find how to get the 'Reason' field content in a
> buildstep.

I've just finally upgraded to buildbot-0.7.10 and there is some additional functionality in place that appears intended to make this a little easier, although the documentation isn't quite there yet.

As far as I can tell, you just need to override the class StatusResourceBuilder method force, and the function make_force_build_form. In the function make_force_build_form you add the additional fields that you wish to allow the user to specify additional properties. And in the force method you process the input from the form and build a properties object which is then added to the "BuildRequest" call.

I think that looks like the most promising method until some functionality is added to handle custom properties on a per-build basis.
 
--
Regards,
Darragh Bailey

Systems Software Engineer
Hewlett Packard Galway Ltd.

Postal Address:    Hewlett Packard Galway Limited, Ballybrit Business Park, Galway
Registered Office: Hewlett Packard Galway Limited, 63-74 Sir John Rogerson's Quay Dublin 2
Registered Number: 361933 



More information about the devel mailing list