[Buildbot-devel] Is that possible to add more Build Properties.
Zhao, Jing
Jing.Zhao at ChasePaymentech.com
Tue May 30 14:29:25 UTC 2006
I just figured out how to add more Build Properties to BuildBot. Since we use 'Force Build' a lot, all the extra build properties are passed into build process via html.py
1. create new sourcestamp.py, my sourcestamp.py is called cpt_sourcestamp.py
#from buildbot.sourcestamp import SourceStamp
from buildbot.cpt_sourcestamp import SourceStamp
add scrnumber = None # scrnumber is our own properties.
compare_attrs = ('branch', 'revision', 'scrnumber', 'patch', 'changes')
def __init__(self, branch=None, revision=None, scrnumber=None, patch=None,
self.scrnumber = scrnumber
make sure your own properties arguments into returned newsource.
scrnumber=self.scrnumber,
2. Modify status/html.py to add your own properties.
in Class StatusResourceBuilder and body attribute, add properties.
+ make_row("SCR in build:",
"<input type='text' name='scr' />")
in force attribute, add following code.
scrnumber = request.args.get("scr", [""])[0]
if scrnumber == "":
scrnumber = None
Make sure all the properties are add to SourceStamp.
s = SourceStamp(branch=branch, revision=revision, scrnumber=scrnumber)
3. in process/base.py, in Build class, setupStatus attribute, add following code
self.setProperty("scrnumber", self.source.scrnumber)
that is all.
I just think how to make this feature generic. Something like Force Build accepts html template, based on the field names of the form, Buildbot dynamically adds all the other than default properties to build. There are a lot of work to be done on 'Force Build'
Post your thought, let us make a change.
Jing
-----Original Message-----
From: Alexander Lorenz [mailto:lorenz at testingtech.de]
Sent: Tuesday, May 30, 2006 8:38 AM
To: Brian Warner
Cc: Zhao, Jing; buildbot-devel at lists.sourceforge.net
Subject: Re: [Buildbot-devel] Is that possible to add more Build
Properties.
> What other properties would you like? The user's manual section on build
> properties[1] describes the existing ones and how to allow your own custom
> steps to create new ones.. are there other properties that would be useful on
> the build overall (as opposed to being specific to one of your custom steps)
> that don't exist yet?
>
perhaps i'm too blind to see, but from the memtioned manual section it
is not clear to me how i would be able to create own custom build
properties that i could e.g. use for passing textual information between
buildsteps, which would be very important to me.
regards
alex
Learn more about Chase Paymentech Solutions,LLC payment processing services at www.chasepaymentech.com.
THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.
...
More information about the devel
mailing list