[or-cvs] r16866: {} Add the buildbot configuration file from the last known runn (in projects/buildbot: . trunk)

nickm at seul.org nickm at seul.org
Fri Sep 12 03:10:58 UTC 2008


Author: nickm
Date: 2008-09-11 23:10:58 -0400 (Thu, 11 Sep 2008)
New Revision: 16866

Added:
   projects/buildbot/branches/
   projects/buildbot/tags/
   projects/buildbot/trunk/
   projects/buildbot/trunk/buildbot.stunnel
   projects/buildbot/trunk/builder_passwords
   projects/buildbot/trunk/master.cfg
Log:
Add the buildbot configuration file from the last known running Tor buildbot to subversion.  The master.cfg in particular is pretty hacked up from the last known-to-work version.  Whoever installs it might want to ask me for the old buildslave passwords and the old ssl cert.

Added: projects/buildbot/trunk/buildbot.stunnel
===================================================================
--- projects/buildbot/trunk/buildbot.stunnel	                        (rev 0)
+++ projects/buildbot/trunk/buildbot.stunnel	2008-09-12 03:10:58 UTC (rev 16866)
@@ -0,0 +1,7 @@
+cert = /home/buildbot/stunnel/cert.pem
+pid = /home/buildbot/stunnel/pid
+session = 7200
+
+[buildbot]
+accept = 9988
+connect = localhost:9989

Added: projects/buildbot/trunk/builder_passwords
===================================================================
--- projects/buildbot/trunk/builder_passwords	                        (rev 0)
+++ projects/buildbot/trunk/builder_passwords	2008-09-12 03:10:58 UTC (rev 16866)
@@ -0,0 +1,16 @@
+# -*- python -*-
+
+# All passwords here are suppressed.  Nick has the real ones.
+
+PASSWORDS = { "totoro": "",
+              "simi-etch": "",
+              "angela-sid": "",
+              "phoboslabs-centos": "",
+              "phoboslabs-gnusolaris": "",
+              "phoboslabs-freebsd": "",
+              "phoboslabs-debian-kfreebsd": "",
+              "maru-irix64": "",
+              "atlantis-osx86": "",
+              "unausprechlich-macppc": "",
+              "unleserlich-sparc64": ""
+             }

Added: projects/buildbot/trunk/master.cfg
===================================================================
--- projects/buildbot/trunk/master.cfg	                        (rev 0)
+++ projects/buildbot/trunk/master.cfg	2008-09-12 03:10:58 UTC (rev 16866)
@@ -0,0 +1,384 @@
+# -*- 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 .
+
+
+# We store the passwords for the buildslaves in a separate file, so we
+# can share this one more widely.
+PASSWORD_FILE = "/home/buildbot/builder_passwords"
+
+d = {}
+execfile(PASSWORD_FILE, d)
+PASSWORDS = d['PASSWORDS']
+del d
+
+ALL_BUILDER_CPUS = {}
+
+# This class is used to configure the capabilities of a given buildslave.
+#
+class Bot:
+  def __init__(self, name, passwd=None, unixy=True, periodic=False, gcc=True, 
+               debian=False, mingw=False, build011=True, build012=True,
+               osx=False,
+               concurrent=True, cpuName=None):
+     self.name = name # What are you called?
+     if passwd == None:
+       passwd = PASSWORDS[name] # What password do you use?
+     self.passwd = passwd
+     # Is this basically a unix-like bot?
+     self.unixy = unixy
+     # Should we schedule the tests for this bot periodically, or based on
+     # changes?
+     self.periodic = periodic
+     # Is this host running with gcc?
+     self.gcc = gcc
+     # Is this a debian host?
+     self.debian = debian
+     # Is this a mingw host?
+     self.mingw = mingw
+     # Should we build the 011 branch?
+     self.build011 = build011
+     # Should we build the 012 branch?
+     self.build012 = build012
+     self.osx = osx # unused
+     # Two bots with the same cpuname have shared resources; balance between
+     # them as though they were a single bot.
+     self.cpuName = cpuName
+     if cpuName:
+         ALL_BUILDER_CPUS[cpuName] = 1
+         concurrent = False
+
+     # Should we run the tests for this bot all at once, or what?
+     self.concurrent = concurrent
+  def getBotCfg(self):
+     return (self.name, self.passwd)
+  def getBuilderTypes(self):
+     names = [ ]
+     if self.mingw:
+         names.append("trunk,static")
+         names.append("-Wlots,static")
+     else:
+         names.append("trunk")
+         if self.build012:
+           names.append("0.1.2")
+         if self.build011:
+           names.append("0.1.1")
+         if self.gcc:
+           names.append("-Wlots")
+     if self.debian:
+         names.append(".deb")
+     return names
+
+  def getBuilderNames(self):
+      return [ "%s (%s)" % (self.name, tp) for tp in self.getBuilderTypes() ]
+
+BOTS = [ Bot("totoro"),
+         Bot("simi-etch", periodic=True),
+         Bot("angela-sid", debian=True),
+         Bot("phoboslabs-centos"), #cpuName=phobos
+         Bot("phoboslabs-gnusolaris", gcc=False, cpuName="phobos"),
+         Bot("phoboslabs-freebsd",  cpuName="phobos"),
+         Bot("phoboslabs-debian-kfreebsd",  debian=True,
+            cpuName="phobos"),
+         # DEAD Bot("phoboslabs-osxppc",  osx=True),
+         Bot("maru-irix64",  gcc=False, build011=False),
+         Bot("atlantis-osx86",  gcc=True, osx=True, concurrent=False),
+         Bot("unausprechlich-macppc", gcc=True, osx=True,
+             concurrent=False),
+         Bot("unleserlich-sparc64")
+       ]
+
+# Map from cpuname to how concurrent we will allow it to get.
+CPU_CONCURRENCY = { "phobos" : 3 }
+
+# This is the dictionary that the buildmaster pays attention to. We also use
+# a shorter alias to save typing.
+c = BuildmasterConfig = {}
+
+####### BUILDSLAVES
+
+# 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.
+c['bots'] = [ b.getBotCfg() for b in BOTS ]
+
+# '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
+
+from buildbot.changes.svnpoller import SVNPoller
+
+# the 'sources' list tells the buildmaster how it should find out about
+# source code changes. Any class which implements IChangeSource can be added
+# to this list: there are several in buildbot/changes/*.py to choose from.
+
+c['sources'] = [ SVNPoller("https://tor-svn.freehaven.net/svn/tor/",
+                           svnbin="/home/buildbot/subversion/bin/svn",
+                           histmax=2) ]
+
+# 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['sources'].append(fc_source)
+
+# or, use a PBChangeSource, and then have your repository's commit script run
+# 'buildbot sendchange', or contrib/svn_buildbot.py, or
+# contrib/arch_buildbot.py :
+#
+#from buildbot.changes.pb import PBChangeSource
+#c['sources'].append(PBChangeSource())
+
+####### LOCKS
+from buildbot.locks import SlaveLock, MasterLock
+
+SlowBuilderLock = SlaveLock("cpu")
+BUILDER_LOCKS = {}
+for bName in ALL_BUILDER_CPUS.keys():
+  lock = MasterLock(bName,maxCount=CPU_CONCURRENCY.get(bName, 1))
+  BUILDER_LOCKS[bName] = lock
+
+del bName
+del lock
+
+####### SCHEDULERS
+
+## configure the Schedulers
+
+FREQUENT_BUILDERS = []
+PERIODIC_BUILDERS = []
+for b in BOTS: #XXXX everything is periodic now; svn polling doesn't seem to work.
+    if b.periodic or True:
+        PERIODIC_BUILDERS.extend(b.getBuilderNames())
+    else:
+        FREQUENT_BUILDERS.extend(b.getBuilderNames())
+
+from buildbot.scheduler import Scheduler, Periodic
+c['schedulers'] = []
+c['schedulers'].append(
+    Scheduler(name="svn", branch=None,
+              treeStableTimer=2*60,
+              builderNames=FREQUENT_BUILDERS))
+
+if PERIODIC_BUILDERS:
+  c['schedulers'].append(
+      Periodic(name="periodic", branch=None,
+               periodicBuildTimer=12*60*60,
+               builderNames=PERIODIC_BUILDERS))
+
+####### 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 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.
+
+builders = []
+
+FACTORIES = {}
+DIRECTORY_TAGS = {}
+
+from buildbot.process import factory
+# when 0.7.5 is released, switch to the commented imports from buildbot.steps
+#from buildbot.process.step import SVN, ShellCommand, Configure, Compile, Test
+from buildbot.steps.source import SVN
+from buildbot.steps.shell import ShellCommand, Configure, Compile, Test
+trunk_build = FACTORIES['trunk'] = f1 = factory.BuildFactory()
+DIRECTORY_TAGS['trunk'] = 'trunk'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/trunk",
+           mode="copy")
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Configure, command=["./configure"])
+f1.addStep(Compile, command=["make"])
+f1.addStep(Test, command=["make", "test"])
+
+BRANCH = "tor-0_1_1-patches"
+branch_build = FACTORIES['0.1.1'] = f1 = factory.BuildFactory()
+DIRECTORY_TAGS['0.1.1'] = 'branch'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/branches/%s"
+                        %BRANCH,
+          mode="copy")
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Configure, command=["./configure"])
+f1.addStep(Compile, command=["make"])
+f1.addStep(Test, command=["./src/or/test"])
+
+BRANCH = "tor-0_1_2-patches"
+branch_build = FACTORIES['0.1.2'] = f1 = factory.BuildFactory()
+DIRECTORY_TAGS['0.1.2'] = 'branch-012'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/branches/%s"
+                        %BRANCH,
+          mode="copy")
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Configure, command=["./configure"])
+f1.addStep(Compile, command=["make"])
+f1.addStep(Test, command=["./src/or/test"])
+
+trunk_warn_build = FACTORIES['-Wlots'] = f1 = factory.BuildFactory()
+DIRECTORY_TAGS['-Wlots'] = 'trunk-warn'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/trunk",
+           mode="copy")
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Configure, command=["./configure", "--enable-gcc-warnings"])
+f1.addStep(Compile, command=["make"])
+f1.addStep(Test, command=["make", "test"])
+
+trunk_static_build = FACTORIES['trunk,static'] = f1 = \
+    factory.BuildFactory()
+DIRECTORY_TAGS['trunk,static'] = 'trunk'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/trunk",
+           mode="copy")
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Configure, command=["./configure",
+                               "--disable-shared", "--enable-static"])
+f1.addStep(Compile, command=["make"])
+f1.addStep(Test, command=["make", "test"])
+
+trunk_static_warn_build = FACTORIES['-Wlots,static'] = f1 = \
+    factory.BuildFactory()
+DIRECTORY_TAGS['-Wlots,static'] = 'trunk-warn'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/trunk",
+           mode="copy")
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Configure, command=["./configure", "--enable-gcc-warnings",
+                               "--disable-shared", "--enable-static"])
+f1.addStep(Compile, command=["make"])
+f1.addStep(Test, command=["make", "test"])
+
+trunk_debian_build = FACTORIES['.deb'] = f1 = factory.BuildFactory()
+DIRECTORY_TAGS['.deb'] = 'trunk-debian'
+f1.addStep(SVN, svnurl="https://tor-svn.freehaven.net/svn/tor/trunk",
+           mode="copy")
+f1.addStep(ShellCommand, name="sed", command=['sed', '-i', 's/.*website.*//',
+                                              'debian/tor.docs'])
+f1.addStep(ShellCommand, name="autogen", command=["./autogen.sh"],
+           env={'NOCONF':"1"},
+           haltOnFailure=True)
+f1.addStep(Compile, command=["debuild", "--no-tgz-check", 
+                             "-rfakeroot", "-uc", "-us" ])
+del f1
+
+b = c['builders'] = []
+
+for bot in BOTS:
+   for tp in bot.getBuilderTypes():
+       d = {'name' : "%s (%s)" %(bot.name, tp),
+            'slavename' : bot.name,
+            'builddir' : "build-%s-%s"%(bot.name, DIRECTORY_TAGS[tp]),
+            'factory' : FACTORIES[tp]}
+       if not bot.concurrent:
+           if bot.cpuName:
+               d['locks'] = [ BUILDER_LOCKS[bot.cpuName] ]
+           else:
+               d['locks'] = [ SlowBuilderLock ]
+       b.append(d)
+
+b.sort(key=lambda x:x['name'])
+
+del b
+
+####### 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.Waterfall(http_port=8010, 
+                                  #allowForce=False
+                                  ))
+
+# from buildbot.status import mail
+# c['status'].append(mail.MailNotifier(fromaddr="buildbot at localhost",
+#                                      extraRecipients=["builds at example.com"],
+#                                      sendToInterestedUsers=False))
+#
+# from buildbot.status import words
+# c['status'].append(words.IRC(host="irc.example.com", nick="bb",
+#                              channels=["#example"]))
+#
+# 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 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'] = "thereGoesTokyo"
+
+# 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'] = "Tor"
+c['projectURL'] = "http://tor.eff.org/"
+
+# 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.
+
+c['buildbotURL'] = "http://tor-buildbot.freehaven.net:8010/"



More information about the tor-commits mailing list