[Buildbot-devel] siteLocal configure option

Elmir Jagudin elmir.jagudin at axis.com
Wed Nov 27 13:06:59 UTC 2013


Hello

At my work we have a CI system build around buildbot with a lot of local 
customizations. We have our custom build steps and status targets, among 
other components. One problem we have is how to configure our local 
components. Up until now we created buildstep properties with 
'c['properties']' section in master.cfg. It did work as long as we 
needed to access these settings from our custom buildsteps. However now 
we need to access the settings from non-buildstep code.

My suggestion is to add a new configuration option 'siteLocal' to 
buildbot. It will act as a hook for storing site local settings. In 
master.cfg you can write:

     c['siteLocal'] = {
         'mySetting1': 'setting 1 value',
         'mySetting2': 'setting 2 value'
     }

These settings will be accessable with following code:

     # load 'mySetting1' value
     setting1 = master.config.siteLocal['mySetting1']
     # load 'mySetting2' value
     setting2 = master.config.siteLocal['mySetting2']

Given master variable is a reference to buildbot.master.BuildMaster 
object. The idea is that any valid python object can be assigned to 
'siteLocal', and it will be copied as-is to config.siteLocal.

I have implemented the suggestion above on this branch:
https://github.com/elmirjagudin/buildbot/tree/site-local

/elmir




More information about the devel mailing list