# -*- python -*- # ex: set syntax=python: # 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 . def split_file_branches(changed_file): pieces = changed_file.split(os.sep) if pieces[1] == 'branches': return (os.path.join(*pieces[0:3]), os.path.join(*pieces[3:])) if pieces[1] == 'trunk': return (os.path.join(*pieces[0:2]), os.path.join(*pieces[2:])) def branch_builder_names(branch, buildslaves): names = [] for slave in buildslaves: for builder in slave['builders']: if builder['name'].startswith(branch): name = "%s.%s" % (slave['name'], builder['name']) names.append(name) return names # This is the dictionary that the buildmaster pays attention to. We also use # a shorter alias to save typing. c = BuildmasterConfig = {} ####### BUILDSLAVES # the 'slaves' list defines the set of allowable buildslaves. Each element is # a BuildSlave object, which is created with bot-name, bot-password. These # correspond to values given to the buildslave's mktap invocation. from buildbot.buildslave import BuildSlave #c['slaves'] = [] # to limit to two concurrent builds on a slave, use # c['slaves'] = [BuildSlave("bot1name", "bot1passwd", max_builds=2)] # 'slavePortnum' defines the TCP port to listen on. This must match the value # configured into the buildslaves (with their --master option) c['slavePortnum'] = 9989 ####### CHANGESOURCES # the 'change_source' setting tells the buildmaster how it should find out # about source code changes. Any class which implements IChangeSource can be # put here: there are several in buildbot/changes/*.py to choose from. #from buildbot.changes.pb import PBChangeSource #c['change_source'] = PBChangeSource() # For example, if you had CVSToys installed on your repository, and your # CVSROOT/freshcfg file had an entry like this: #pb = ConfigurationSet([ # (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)), # ]) # then you could use the following buildmaster Change Source to subscribe to # the FreshCVS daemon and be notified on every commit: # #from buildbot.changes.freshcvs import FreshCVSSource #fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar") #c['change_source'] = fc_source # or, use a PBChangeSource, and then have your repository's commit script run # 'buildbot sendchange', or use contrib/svn_buildbot.py, or # contrib/arch_buildbot.py : # from buildbot.changes.pb import PBChangeSource c['change_source'] = [] c['change_source'].append(PBChangeSource()) ####### BUILDERS # # 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 builder # 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/steps/source.py for # CVS, SVN, and others. from buildbot.process import factory from buildbot.steps.source import SVN, Git from buildbot.steps.shell import ShellCommand, Configure, Compile, Test # Default Vidalia build factory vidalia_default_factory = factory.BuildFactory() vidalia_default_factory.addStep(SVN, mode="copy", baseURL="http://svn.vidalia-project.net/svn/") vidalia_default_factory.addStep(Configure, command=["cmake", "."]) vidalia_default_factory.addStep(Compile, command=["make", "-k", "VERBOSE=1"]) # Build factory for Mac OS X 10.6 builders without a 64-bit Qt vidalia_osx_sl_factory = factory.BuildFactory() vidalia_osx_sl_factory.addStep(SVN, mode="copy", baseURL="http://svn.vidalia-project.net/svn/") vidalia_osx_sl_factory.addStep(Configure, command=["cmake", "-DOSX_FORCE_32BIT=1", "."]) vidalia_osx_sl_factory.addStep(Compile, command=["make", "-k", "VERBOSE=1"]) # Build factory for Windows/MinGW builders vidalia_mingw_factory = factory.BuildFactory() vidalia_mingw_factory.addStep(SVN, mode="copy", baseURL="http://svn.vidalia-project.net/svn/") vidalia_mingw_factory.addStep(Configure, command=["cmake", "-G", "MinGW Makefiles", "."]) vidalia_mingw_factory.addStep(Compile, command=["make", "VERBOSE=1"]) # Default Tor 0.2.2.x build factories tor_master_factory = factory.BuildFactory() tor_master_factory.addStep(Git, repourl="git://git.torproject.org/git/tor", branch="master") tor_master_factory.addStep(ShellCommand, name="autogen", command=["./autogen.sh"], env={'NOCONF' : "1" }, haltOnFailure=True) tor_master_factory.addStep(Configure, command=["./configure", "--enable-gcc-warnings", "--disable-asciidoc"]) tor_master_factory.addStep(Compile, command=["make", "-k"]) tor_master_factory.addStep(Test, command=["src/test/test", "--debug"]) tor_master_msys_factory = factory.BuildFactory() tor_master_msys_factory.addStep(Git, repourl="git://git.torproject.org/git/tor", branch="master") tor_master_msys_factory.addStep(ShellCommand, name="autogen", command=["autogen.sh"], env={'NOCONF' : "1" }, haltOnFailure=True) tor_master_msys_factory.addStep(Configure, command=["configure", "--enable-gcc-warnings"]) tor_master_msys_factory.addStep(Compile, command=["make"]) tor_master_msys_factory.addStep(Test, command=["src/test/test", "--debug"]) # Default Tor 0.2.1.x build factories tor_maint_021_factory = factory.BuildFactory() tor_maint_021_factory.addStep(Git, repourl="git://git.torproject.org/git/tor", branch="maint-0.2.1") tor_maint_021_factory.addStep(ShellCommand, name="autogen", command=["./autogen.sh"], env={'NOCONF' : "1" }, haltOnFailure=True) tor_maint_021_factory.addStep(Configure, command=["./configure", "--enable-gcc-warnings"]) tor_maint_021_factory.addStep(Compile, command=["make", "-k"]) tor_maint_021_factory.addStep(Test, command=["src/or/test", "--debug"]) tor_maint_021_msys_factory = factory.BuildFactory() tor_maint_021_msys_factory.addStep(Git, repourl="git://git.torproject.org/git/tor", branch="maint-0.2.1") tor_maint_021_msys_factory.addStep(ShellCommand, name="autogen", command=["autogen.sh"], env={'NOCONF' : "1" }, haltOnFailure=True) tor_maint_021_msys_factory.addStep(Configure, command=["configure", "--enable-gcc-warnings"]) tor_maint_021_msys_factory.addStep(Compile, command=["make"]) tor_maint_021_msys_factory.addStep(Test, command=["src/or/test", "--debug"]) # Default Polipo build factories polipo_master_factory = factory.BuildFactory() polipo_master_factory.addStep(Git, repourl="git://git.torproject.org/git/polipo", branch="master") polipo_master_factory.addStep(Compile, command=["make", "-k"], env={'EXTRA_DEFINES' : '-Werror'}) # Pull the slave passwords from a separate file d = {} execfile("/home/buildbot/slaves.passwd", d) passwd = d['PASSWORDS'] # Set up all the slaves and builders buildslaves = [ { # kore.cs.rpi.edu (FC11) 'name' : 'kore.fc13', 'password' : passwd['kore.fc13'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_default_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_default_factory }, { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory }, { 'name' : 'polipo-master', 'factory' : polipo_master_factory } ] }, { # kore.cs.rpi.edu (Ubuntu 9.04) 'name' : 'kore.ubuntu-9.04', 'password' : passwd['kore.ubuntu-9.04'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_default_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_default_factory }, { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory }, { 'name' : 'polipo-master', 'factory' : polipo_master_factory } ] }, { # kore.cs.rpi.edu (Windows XP) 'name' : 'kore.windows-xp', 'password' : passwd['kore.windows-xp'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_mingw_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_mingw_factory } ] }, { # kore.cs.rpi.edu (Debian 5.0 -- Lenny) 'name' : 'kore.debian-5.0', 'password' : passwd['kore.debian-5.0'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_default_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_default_factory }, { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory }, { 'name' : 'polipo-master', 'factory' : polipo_master_factory } ] }, { # kore.cs.rpi.edu (FreeBSD 7.1) 'name' : 'kore.freebsd-7.1', 'password' : passwd['kore.freebsd-7.1'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_default_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_default_factory }, { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory }, { 'name' : 'polipo-master', 'factory' : polipo_master_factory } ] }, { # adrastea (OS X Tiger PPC) 'name' : 'adrastea.osx-tiger', 'password' : passwd['adrastea.osx-tiger'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_default_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_default_factory }, { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory }, { 'name' : 'polipo-master', 'factory' : polipo_master_factory } ] }, { # phobos (OS X Panther PPC) 'name' : 'phobos.osx-panther', 'password' : passwd['phobos.osx-panther'], 'builders' : [ { 'name' : 'vidalia-trunk', 'factory' : vidalia_default_factory }, { 'name' : 'vidalia-0.1.x', 'factory' : vidalia_default_factory }, { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory }, { 'name' : 'polipo-master', 'factory' : polipo_master_factory } ] }, { # saeftl (OpenBSD - Sparc64) 'name' : 'obsd-sparc64', 'password' : passwd['obsd-sparc64'], 'builders' : [ { 'name' : 'tor-master', 'factory' : tor_master_factory }, { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory } ] } # { # coderman's PS3 # 'name' : 'coderman.ps3', # 'password' : passwd['coderman.ps3'], # 'builders' : [ # { 'name' : 'tor-master', 'factory' : tor_master_factory }, # { 'name' : 'tor-maint-0.2.1', 'factory' : tor_maint_021_factory } # ] # } ] c['slaves'] = [] c['builders'] = [] for slave in buildslaves: c['slaves'].append(BuildSlave(slave['name'], slave['password'])) for builder in slave['builders']: c['builders'].append({ 'name' : "%s.%s" % (slave['name'], builder['name']), 'slavename' : slave['name'], 'builddir' : "build.%s.%s" % (slave['name'], builder['name']), 'factory' : builder['factory'] }) ####### SCHEDULERS from buildbot.scheduler import Scheduler, Periodic c['schedulers'] = [] vidalia_trunk_builders = branch_builder_names('vidalia-trunk', buildslaves) c['schedulers'].append(Scheduler(name="vidalia-trunk", branch="vidalia/trunk", treeStableTimer=30, builderNames=vidalia_trunk_builders)) vidalia_stable_builders = branch_builder_names('vidalia-0.1.x', buildslaves) c['schedulers'].append(Scheduler(name="vidalia-stable", branch="vidalia/branches/vidalia-0.1", treeStableTimer=30, builderNames=vidalia_stable_builders)) tor_master_builders = branch_builder_names('tor-master', buildslaves) c['schedulers'].append(Scheduler(name="tor-trunk", branch="master", treeStableTimer=30, builderNames=tor_master_builders)) c['schedulers'].append(Periodic(name="periodic-tor-trunk", branch="master", periodicBuildTimer=1*60*60, builderNames=tor_master_builders)) tor_021_builders = branch_builder_names('tor-maint-0.2.1', buildslaves) c['schedulers'].append(Scheduler(name="tor-maint-0.2.1", branch="maint-0.2.1", treeStableTimer=30, builderNames=tor_021_builders)) c['schedulers'].append(Periodic(name="periodic-tor-maint-0.2.1", branch="maint-0.2.1", periodicBuildTimer=4*60*60, builderNames=tor_021_builders)) polipo_master_builders = branch_builder_names('polipo-master', buildslaves) c['schedulers'].append(Scheduler(name="tor-master", branch="master", treeStableTimer=30, builderNames=polipo_master_builders)) c['schedulers'].append(Periodic(name="periodic-polipo-master", branch="master", periodicBuildTimer=1*60*60, builderNames=polipo_master_builders)) ####### STATUS TARGETS # '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'] = [] from buildbot.status import html c['status'].append(html.WebStatus(http_port=8010, allowForce=False)) # from buildbot.status import mail # c['status'].append(mail.MailNotifier(fromaddr="buildbot@localhost", # extraRecipients=["builds@example.com"], # sendToInterestedUsers=False)) # from buildbot.status import words c['status'].append(words.IRC(host="irc.oftc.net", nick="nro", channels=["vidalia"], notify_events={ 'successToFailure': 1, })) # from buildbot.status import client # c['status'].append(client.PBListener(9988)) ####### DEBUGGING OPTIONS # 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 committing 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'] = "yourMomIsABuildbot" # if you set 'manhole', you can ssh 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. You can also # use an authorized_keys file, or plain telnet. #from buildbot import manhole #c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1", # "admin", "password") ####### PROJECT IDENTITY # 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'] = "Vidalia" c['projectURL'] = "https://www.torproject.org/vidalia/" # the 'buildbotURL' string should point to the location where the buildbot's # internal web server (usually the html.Waterfall page) is visible. This # typically uses the port number set in the Waterfall 'status' entry, but # with an externally-visible host name which the buildbot cannot figure out # without some help.