[Buildbot-devel] Noob master.cfg question....

Shaun O'Shea osheas at cadence.com
Fri Jan 18 13:37:28 UTC 2008


Hi,
 
After years of writing my own automated build systems using various
flavours of shell scripts etc I'm looking try something 'off the shelf'.
Having investigated a number of options I like the look of buildbot
given that we build our stuff on numerous platforms with different
compilers etc (Sun sparc, Sun x86, Linux, AIX, Windoze....)

I have googled around and read as much as I could find before posting
this, if I've missed an obvious location for info then please pass it
on....
 
So far I have downloaded and installed:
 
Buildbot 0.7.6 
Twisted 2.5.0 
Python  2.5.1
 
I'm also a noob as far as python is concerned but it doesn't look too
scary :)
 
So I've been trying to edit the master.cfg to get a buildmaster going
with approximate basic config but with no success.....
 
Here's the output when I try to start buildbot:
<SNIP>
COPS-pubtools66% buildbot start `pwd`
Following twistd.log until startup finished..
2008/01/18 14:11 +0100 [-] Log opened.
2008/01/18 14:11 +0100 [-] twistd 2.5.0
(/projects/install_dub/cops/tools/lnx86/bin/python 2.5.1) starting up
2008/01/18 14:11 +0100 [-] reactor class: <class
'twisted.internet.selectreactor.SelectReactor'>
2008/01/18 14:11 +0100 [-] Loading buildbot.tac...
2008/01/18 14:11 +0100 [-] Loaded.
2008/01/18 14:11 +0100 [-] loading configuration from
/home/pubtools/BUILDBOT/Master/master.cfg
2008/01/18 14:11 +0100 [-] error while parsing config file
2008/01/18 14:11 +0100 [-] error during loadConfig
2008/01/18 14:11 +0100 [-] Unhandled Error
        Traceback (most recent call last):
          File
"/projects/install_dub/cops/tools/lnx86/lib/python2.5/site-packages/twis
ted/scripts/_twistd_unix.py", line 183, in startApplication
            app.startApplication(application, not config['no_save'])
          File
"/projects/install_dub/cops/tools/lnx86/lib/python2.5/site-packages/twis
ted/application/app.py", line 400, in startApplication
            service.IService(application).startService()
          File
"/projects/install_dub/cops/tools/lnx86/lib/python2.5/site-packages/twis
ted/application/service.py", line 233, in startService
            service.startService()
          File
"/projects/install_dub/cops/tools/lnx86/lib/python2.5/site-packages/buil
dbot/master.py", line 407, in startService
            self.loadTheConfigFile()
        --- <exception caught here> ---
          File
"/projects/install_dub/cops/tools/lnx86/lib/python2.5/site-packages/buil
dbot/master.py", line 462, in loadTheConfigFile
            self.loadConfig(f)
          File
"/projects/install_dub/cops/tools/lnx86/lib/python2.5/site-packages/buil
dbot/master.py", line 480, in loadConfig
            exec f in localDict
          File "/home/pubtools/BUILDBOT/Master/master.cfg", line 108, in
<module>
            f.addStep(CVS(cvsroot=cvsroot, cvsmodule=cadencehelp,
login="", branch="branch1_1", mode="copy"))
        exceptions.NameError: name 'cadencehelp' is not defined
 
2008/01/18 14:11 +0100 [-] The new config file is unusable, so I'll
ignore it.
2008/01/18 14:11 +0100 [-] I will keep using the previous config file
instead.
 
The buildmaster appears to have encountered an error in the master.cfg
config file during startup. It is probably running with an empty
configuration right now. Please inspect and fix master.cfg, then restart
the buildmaster.

COPS-pubtools68% buildbot --version
Buildbot version: 0.7.6
Twisted version: 2.5.0
COPS-pubtools69% python --version
Python 2.5.1
COPS-pubtools70%
</SNIP>
 
Anybody got any ideas?

Here's my master.cfg without comments, I've put it together from reading
various web pages and looking at sample .cfg's etc...:

<SNIP>
c = BuildmasterConfig = {}


from buildbot.buildslave import BuildSlave 
c['slaves'] = [BuildSlave("linpc-script1", "32bitlnx86")]

c['slavePortnum'] = 9989

from buildbot.changes.pb import PBChangeSource 
c['change_source'] = PBChangeSource()


from buildbot.scheduler import Scheduler, Periodic 
periodic = Periodic("every_1_hours", ["lnx86-builder"], 60*60) 
c['schedulers'] = [periodic]

cvsroot =
":pserver:pubtools at cdsirl40:/projects/install_dub/CVS/repository"
cvsmodule = "cadencehelp"

from buildbot.process import factory
from buildbot.steps.source import CVS
from buildbot.steps.shell import Compile 
from buildbot.steps.python_twisted import Trial 
f = factory.BuildFactory() 
f.addStep(CVS(cvsroot=cvsroot, cvsmodule=cadencehelp, login="",
branch="branch1_1", mode="copy")) 
f.addStep(Compile(command=["echo TESTCOMPILE | mail osheas"]))

b1 = {'name': "lnx86-builder",
      'slavename': "linpc-script1",
      'builddir': "full",
      'factory': f,
      }
c['builders'] = [b1]

c['status'] = []

from buildbot.status import html
c['status'].append(html.WebStatus(http_port=8010))




c['projectName'] = "CadenceHelp"
c['projectURL'] =
"http://ecms.cadence.com/bin/view.cgi/CadenceHelp/WebHome/"


c['buildbotURL'] = "http://cops-ray2:8010/"
</SNIP>

I reckon if I can get past this basic first hurdle I should be able to
make some progress.
Any suggestions greatly appreciated!

Cheers,

~Shaun.





More information about the devel mailing list