[Buildbot-devel] buildbot-0.6.2: need to change master.cfg?

Justin Mason jm at jmason.org
Mon Dec 13 19:17:46 UTC 2004


BTW, I'm seeing these errors using my 0.6.1 master.cfg with 0.6.2:

2004/12/13 11:10 PST [-] Log opened.
2004/12/13 11:10 PST [-] twistd 1.3.0rc1 (/usr/bin/python2.2 2.2.2) starting up
2004/12/13 11:10 PST [-] reactor class: twisted.internet.default.SelectReactor
2004/12/13 11:10 PST [-] Loading buildbot.tap...
2004/12/13 11:10 PST [-] Loaded.
2004/12/13 11:10 PST [-] set uid/gid 507/507
2004/12/13 11:10 PST [-] loading configuration from /home/buildbot/bots/sa/master.c
fg
2004/12/13 11:10 PST [-] error during loadConfig
2004/12/13 11:10 PST [-] Traceback (most recent call last):
          File "/usr/lib/python2.2/site-packages/twisted/scripts/twistd.py", line 161, in startApplication
            app.startApplication(application, not config['no_save'])
          File "/usr/lib/python2.2/site-packages/twisted/application/app.py", line 225, in startApplication
            service.IService(application).startService()
          File "/usr/lib/python2.2/site-packages/twisted/application/service.py", line 210, in startService
            service.startService()
          File "/usr/lib/python2.2/site-packages/buildbot/master.py", line 605, in startService
            self.loadTheConfigFile()
        --- <exception caught here> ---
          File "/usr/lib/python2.2/site-packages/buildbot/master.py", line 653, in loadTheConfigFile
            self.loadConfig(f)
          File "/usr/lib/python2.2/site-packages/buildbot/master.py", line 746, in loadConfig
            self.loadConfig_Slaves(bots)
          File "/usr/lib/python2.2/site-packages/buildbot/master.py", line 801, in loadConfig_Slaves
            old = self.bots; oldnames = [name for name,pw in old]
        exceptions.AttributeError: BuildMaster instance has no attribute 'bots'


Here's my master.cfg, with passwords fuzzed out.  I'm not much with python
yet, but it *looks* OK to me still, and matches docs/examples/*.cfg
reasonably closely.  does anything jump out to anyone?

--j.

-------------- next part --------------
#! /usr/bin/python
# search for "CONFIG" to find our frequently-changed settings --jm

# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory (although the filename
# can be changed with the --basedir option to 'mktap buildbot master').

# It has one job: define a dictionary named BuildmasterConfig. This
# dictionary has a variety of keys to control different aspects of the
# buildmaster. They are documented in docs/config.xhtml .

import os.path
from buildbot.status import html
from buildbot.process.factory import s

# to save typing, we create a dictionary named 'c' and rename it later
c = {}


c['sources'] = []
from buildbot.changes.mail import SvnCommitsMaildirSource
c['sources'].append(
	SvnCommitsMaildirSource("/home/buildbot/Maildir/commits",
        prefix="spamassassin"))


# the 'builders' list defines the Builders. Each one is configured with a
# dictionary, using the following keys:
#  name (required): the name used to describe this bilder
#  slavename (required): which slave to use, must appear in c['bots']
#  builddir (required): which subdirectory to run the builder in
#  factory (required): a BuildFactory to define how the build is run
#  periodicBuildTime (optional): if set, force a build every N seconds

# buildbot/process/factory.py provides several BuildFactory classes you can
# start with, which implement build processes for common targets (GNU
# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the
# base class, and is configured with a series of BuildSteps. When the build
# is run, the appropriate buildslave is told to execute each Step in turn.

# the first BuildStep is typically responsible for obtaining a copy of the
# sources. There are source-obtaining Steps in buildbot/process/step.py for
# CVS, SVN, and others.

c['builders'] = []
c['bots'] = []
from buildbot.process import step, factory
from buildbot.process.factory import CPAN, s


# jm: our builders and bots go here!   CONFIG !BOTS!

# the 'bots' list defines the set of allowable buildslaves. Each element is a
# tuple of bot-name and bot-password. These correspond to values given to the
# buildslave's mktap invocation.
#
# the default password for user-defined buildbots is: qsFxTfcG

c['bots'] = [
	("bugz-rh73", "xxxxxxxxxxxxx"),
	("bugz-561", "xxxxxxxxxxxxx"),
	("perl-581", "xxxxxxxxxxxxx"),
	("bugz-585-thr", "xxxxxxxxxxxxxxxxxxxxxxxxx"),
	("parker-suse-9.2","xxxxxxxxxxxxx"),
        ("parker-freebsd-5.3","xxxxxxxxxxxxx"),
        ("debian-stable","xxxxxxxxxxxxx"),
        ("sidney-fedora3","xxxxxxxxxxxxx"),
        ("sidney-cygwin","xxxxxxxxxxxxx"),
        ("sidney-win32","xxxxxxxxxxxxx"),
	]

# this is the standard set of build steps, with a "make distcheck" and a
# "make disttest" thrown in, along with a little extra paranoia about being
# pristine beforehand.
#
steps = [
	s(step.SVN, svnurl="http://svn.apache.org/repos/asf/spamassassin/trunk", mode="update"),
	s(step.Configure, command="perl Makefile.PL < /dev/null; make distclean; rm -rf Mail-SpamAssassin*"),
	s(step.Configure, command="perl Makefile.PL < /dev/null"),
	s(step.Compile, command=["make"]),
	s(step.Test, command=["make", "test"]),
	s(step.Test, command=["make", "distcheck"]),
	s(step.Test, command="make disttest < /dev/null"),
	];
f1 = factory.BuildFactory(steps)

b1 = { "name": "trunk-red-hat-7.3", "slavename": "bugz-rh73", "builddir": "trunk-red-hat-7.3", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "trunk-parker-suse-9.2", "slavename": "parker-suse-9.2", "builddir": "trunk-parker-suse-9.2", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "trunk-parker-freebsd-5.3", "slavename": "parker-freebsd-5.3", "builddir": "trunk-parker-freebsd-5.3", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "trunk-debian-stable", "slavename": "debian-stable", "builddir": "trunk-debian-stable", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "trunk-sidney-fedora3", "slavename": "sidney-fedora3", "builddir": "trunk-sidney-fedora3", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "trunk-sidney-cygwin", "slavename": "sidney-cygwin", "builddir": "trunk-sidney-cygwin", "factory": f1, }
c['builders'].append(b1)


# pretty similar to above, but using a specific perl binary
steps = [
	s(step.SVN, svnurl="http://svn.apache.org/repos/asf/spamassassin/trunk", mode="update"),
	s(step.Configure, command="perl Makefile.PL < /dev/null; make distclean; rm -rf Mail-SpamAssassin*"),
	s(step.Configure, command="/usr/local/perl561/bin/perl Makefile.PL < /dev/null"),
	s(step.Compile, command=["make"]), s(step.Test, command=["make", "test"]),
	s(step.Test, command=["make", "distcheck"]),
	s(step.Test, command="make disttest < /dev/null"),
	];
f1 = factory.BuildFactory(steps)
b1 = { "name": "trunk-vanilla-5.6.1", "slavename": "bugz-561", "builddir": "trunk-vanilla-5.6.1", "factory": f1, }
c['builders'].append(b1)


# pretty similar to above, but using a specific perl binary
steps = [
	s(step.SVN, svnurl="http://svn.apache.org/repos/asf/spamassassin/trunk", mode="update"),
	s(step.Configure, command="perl Makefile.PL < /dev/null; make distclean; rm -rf Mail-SpamAssassin*"),
	s(step.Configure, command="/usr/local/perl585thr/bin/perl Makefile.PL < /dev/null"),
	s(step.Compile, command=["make"]), s(step.Test, command=["make", "test"]),
	s(step.Test, command=["make", "distcheck"]),
	s(step.Test, command="make disttest < /dev/null"),
	];
f1 = factory.BuildFactory(steps)
b1 = { "name": "trunk-threaded-5.8.5", "slavename": "bugz-585-thr", "builddir": "trunk-threaded-5.8.5", "factory": f1, }
c['builders'].append(b1)


# pretty similar to above, but using a specific perl binary
steps = [
	s(step.SVN, svnurl="http://svn.apache.org/repos/asf/spamassassin/trunk", mode="update"),
	s(step.Configure, command="perl Makefile.PL < /dev/null; make distclean; rm -rf Mail-SpamAssassin*"),
	s(step.Configure, command="/usr/local/perl581/bin/perl Makefile.PL < /dev/null"),
	s(step.Compile, command=["make"]), s(step.Test, command=["make", "test"]),
	s(step.Test, command=["make", "distcheck"]),
	s(step.Test, command="make disttest < /dev/null"),
	];
f1 = factory.BuildFactory(steps)
b1 = { "name": "reqd-modules-only-5.8.1", "slavename": "perl-581", "builddir": "trunk", "factory": f1, }
c['builders'].append(b1)


# 3.0 branch
steps = [
	s(step.SVN, svnurl="http://svn.apache.org/repos/asf/spamassassin/branches/3.0", mode="update"),
	s(step.Configure, command="perl Makefile.PL < /dev/null; make distclean; rm -rf Mail-SpamAssassin*"),
	s(step.Configure, command="perl Makefile.PL < /dev/null"),
	s(step.Compile, command=["make"]), s(step.Test, command=["make", "test"]),
	s(step.Test, command=["make", "distcheck"]),
	s(step.Test, command="make disttest < /dev/null"),
	];
f1 = factory.BuildFactory(steps)
b1 = { "name": "b3.0-red-hat-7.3", "slavename": "bugz-rh73", "builddir": "b3.0-red-hat-7.3", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "b3.0-parker-suse-9.2", "slavename": "parker-suse-9.2", "builddir": "b3.0-parker-suse-9.2", "factory": f1, }
c['builders'].append(b1)

b1 = { "name": "b3.0-parker-freebsd-5.3", "slavename": "parker-freebsd-5.3", "builddir": "b3.0-parker-freebsd-5.3", "factory": f1, }
c['builders'].append(b1)

# These are the steps, from Sidney, for building under win32
#Building in Windows would use, assuming that the environment is set up
#so that svn, perl, and the Microsoft compiler all work:
#
#  svn up http://svn.apache.org/repos/asf/spamassassin/trunk
#  perl Makefile.PL < nul:
#  nmake distclean
#  rmdir /s /q Mail-SpamAssassin* 2> nul:
#  del /f /q Mail-SpamAssassin* 2> nul:
#  perl Makefile.PL < nul:
#  nmake
#  nmake test
#  nmake distcheck
#  nmake disttest < nul:
#
#There is no direct equivalent of rm -rf as you can see. Deleting a
#directory uses a different command than deleting a file. The options I
#use there are only valid in Windows 2K and XP, but it is reasonable to
#require that for the build environment. Notice that even though the
#commands have a "quiet" option they still emit warnings to stderr when
#the file or directory doesn't exist, hence the redirection to nul.
#
#If you really want multiple commands on one line in the first configure
#step, you can, but use '&' instead of ';' for the command separator
#character.
#

steps = [
	s(step.SVN, svnurl="http://svn.apache.org/repos/asf/spamassassin/trunk", mode="update"),
	s(step.Configure, command="perl Makefile.PL < nul: & nmake distclean & rmdir /s /q Mail-SpamAssassin* 2> nul: & del /f /q Mail-SpamAssassin* 2> nul:"),
	s(step.Configure, command="perl Makefile.PL < nul:"),
	s(step.Compile, command=["nmake"]),
        s(step.Test, command=["nmake", "test"]),
	s(step.Test, command=["nmake", "distcheck"]),
	s(step.Test, command="nmake disttest < nul:"),
	];
f1 = factory.BuildFactory(steps)
b1 = { "name": "trunk-sidney-win32", "slavename": "sidney-win32", "builddir": "trunk-sidney-win32", "factory": f1, }
c['builders'].append(b1)

# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)

c['slavePortnum'] = 9989

# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.

c['status'] = []
c['status'].append(html.Waterfall(http_port=8010))

from buildbot.status import mail
c['status'].append(mail.MailNotifier(fromaddr="buildbot at bugzilla.spamassassin.org",
			extraRecipients=["commits at spamassassin.apache.org"],
			mode="problem",
                        sendToInterestedUsers=True))

# from buildbot.status import words
# c['status'].append(words.IRC(host="irc.example.com", nick="bb",
#                              channels=["#example"]))


# if you set 'debugPassword', then you can connect to the buildmaster with
# the diagnostic tool in contrib/debugclient.py . From this tool, you can
# manually force builds and inject changes, which may be useful for testing
# your buildmaster without actually commiting changes to your repository (or
# before you have a functioning 'sources' set up). The debug tool uses the
# same port number as the slaves do: 'slavePortnum'.

# c['debugPassword'] = "debugpassword"

# if you set 'manhole', you can telnet into the buildmaster and get an
# interactive python shell, which may be useful for debugging buildbot
# internals. It is probably only useful for buildbot developers.
# from buildbot.master import Manhole
#c['manhole'] = Manhole(9999, "admin", "password")

# the 'projectName' string will be used to describe the project that this
# buildbot is working on. For example, it is used as the title of the
# waterfall HTML page. The 'projectURL' string will be used to provide a link
# from buildbot HTML pages to your project's home page.

c['projectName'] = "SpamAssassin"
c['projectURL'] = "http://spamassassin.apache.org/"

# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server is visible. This is typically at the port number set in
# the Waterfall 'status' entry, but at an externally-visible host name which
# the buildbot cannot on its own.

c['buildbotURL'] = "http://bugzilla.spamassassin.org:8010/"

# finally we define the name that the buildmaster has been waiting for.

BuildmasterConfig = c



More information about the devel mailing list