[Buildbot-devel] splitting master.cfg

Charles Lepple clepple at gmail.com
Thu Nov 13 04:14:06 UTC 2008


On Wed, Nov 12, 2008 at 10:58 PM, Vikki Finnan <vjf04 at hampshire.edu> wrote:
> I am working with a rather complicated build setup and my master.cfg
> is rather long. If I add a module and run an import command (import
> buildsteps), the setup will work fine for the first time.
>
> If I make changes to the buildsteps.py file and run buildbot reconfig,
> everything will work fine, but the changes that I made were not
> reflected.
>
> I can get this to work if I to something like:
>
> import buildsteps
> reload(buildsteps)
> from buildsteps import *
>
> but this causes all the builders to say 'config updated' and still
> seems to sometimes have the problem of changes not being reflected.

I use something like this to conditionally reload:

    import sys, os, stat
    sys.path.append(os.path.expanduser('~buildbot/master'))
    import buildbot_nut

    py_time  = os.stat("buildbot_nut.py").st_mtime
    pyc_time = os.stat("buildbot_nut.pyc").st_mtime
    if py_time >= pyc_time:
        reload(buildbot_nut)

It sounds like you would need to do this several times over, once per
independent builder.

Also, I have had better luck when I avoid using the 'from foo import
*' syntax. You may want to just say 'import buildsteps' and use
"buildsteps.step1" instead of just "step1".

-- 
- Charles Lepple




More information about the devel mailing list