Added master.cfg from buildbot for safe keeping.
authorDavid Anderson <dvander@alliedmods.net>
Sat Sep 06 23:36:04 2008 +0000 (2008-09-06)
changeset 2269a0b54dcc11f9
parent 2268 cc0a4b016dd7
child 2270 aa22e917b31e
Added master.cfg from buildbot for safe keeping.
tools/buildbot/master.cfg
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/buildbot/master.cfg	Sat Sep 06 23:36:04 2008 +0000
     1.3 @@ -0,0 +1,251 @@
     1.4 +# -*- python -*-
     1.5 +# ex: set syntax=python:
     1.6 +
     1.7 +# This is a sample buildmaster config file. It must be installed as
     1.8 +# 'master.cfg' in your buildmaster's base directory (although the filename
     1.9 +# can be changed with the --basedir option to 'mktap buildbot master').
    1.10 +
    1.11 +# It has one job: define a dictionary named BuildmasterConfig. This
    1.12 +# dictionary has a variety of keys to control different aspects of the
    1.13 +# buildmaster. They are documented in docs/config.xhtml .
    1.14 +
    1.15 +
    1.16 +# This is the dictionary that the buildmaster pays attention to. We also use
    1.17 +# a shorter alias to save typing.
    1.18 +c = BuildmasterConfig = {}
    1.19 +
    1.20 +####### BUILDSLAVES
    1.21 +
    1.22 +# the 'slaves' list defines the set of allowable buildslaves. Each element is
    1.23 +# a tuple of bot-name and bot-password. These correspond to values given to
    1.24 +# the buildslave's mktap invocation.
    1.25 +from buildbot.buildslave import BuildSlave
    1.26 +c['slaves'] = [
    1.27 +                BuildSlave("linux",     "***"),
    1.28 +                BuildSlave("win32",     "***")
    1.29 +              ]
    1.30 +	
    1.31 +
    1.32 +# to limit to two concurrent builds on a slave, use
    1.33 +#  c['slaves'] = [BuildSlave("bot1name", "bot1passwd", max_builds=2)]
    1.34 +
    1.35 +
    1.36 +# 'slavePortnum' defines the TCP port to listen on. This must match the value
    1.37 +# configured into the buildslaves (with their --master option)
    1.38 +
    1.39 +c['slavePortnum'] = 0000
    1.40 +
    1.41 +####### CHANGESOURCES
    1.42 +
    1.43 +# the 'change_source' setting tells the buildmaster how it should find out
    1.44 +# about source code changes. Any class which implements IChangeSource can be
    1.45 +# put here: there are several in buildbot/changes/*.py to choose from.
    1.46 +
    1.47 +from buildbot.changes.pb import PBChangeSource
    1.48 +c['change_source'] = PBChangeSource()
    1.49 +
    1.50 +# For example, if you had CVSToys installed on your repository, and your
    1.51 +# CVSROOT/freshcfg file had an entry like this:
    1.52 +#pb = ConfigurationSet([
    1.53 +#    (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
    1.54 +#    ])
    1.55 +
    1.56 +# then you could use the following buildmaster Change Source to subscribe to
    1.57 +# the FreshCVS daemon and be notified on every commit:
    1.58 +#
    1.59 +#from buildbot.changes.freshcvs import FreshCVSSource
    1.60 +#fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
    1.61 +#c['change_source'] = fc_source
    1.62 +
    1.63 +# or, use a PBChangeSource, and then have your repository's commit script run
    1.64 +# 'buildbot sendchange', or use contrib/svn_buildbot.py, or
    1.65 +# contrib/arch_buildbot.py :
    1.66 +#
    1.67 +#from buildbot.changes.pb import PBChangeSource
    1.68 +#c['change_source'] = PBChangeSource()
    1.69 +
    1.70 +
    1.71 +####### SCHEDULERS
    1.72 +
    1.73 +## configure the Schedulers
    1.74 +
    1.75 +from buildbot.scheduler import Scheduler
    1.76 +
    1.77 +schedTrunk = Scheduler(
    1.78 +        name            = "1.1-trunk",
    1.79 +        branch          = "trunk",
    1.80 +        treeStableTimer = 1*60,
    1.81 +        builderNames    = ["linux-trunk", "win32-trunk"]
    1.82 +        )
    1.83 +schedStable = Scheduler(
    1.84 +        name            = "1.0-stable",
    1.85 +        branch          = "branches/sourcemod-1.0.x",
    1.86 +        treeStableTimer = 1*60,
    1.87 +        builderNames    = ["linux-stable", "win32-stable"]
    1.88 +        )
    1.89 +
    1.90 +c['schedulers'] = [schedStable, schedTrunk]
    1.91 +
    1.92 +
    1.93 +####### BUILDERS
    1.94 +
    1.95 +# the 'builders' list defines the Builders. Each one is configured with a
    1.96 +# dictionary, using the following keys:
    1.97 +#  name (required): the name used to describe this bilder
    1.98 +#  slavename (required): which slave to use, must appear in c['bots']
    1.99 +#  builddir (required): which subdirectory to run the builder in
   1.100 +#  factory (required): a BuildFactory to define how the build is run
   1.101 +#  periodicBuildTime (optional): if set, force a build every N seconds
   1.102 +
   1.103 +# buildbot/process/factory.py provides several BuildFactory classes you can
   1.104 +# start with, which implement build processes for common targets (GNU
   1.105 +# autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the
   1.106 +# base class, and is configured with a series of BuildSteps. When the build
   1.107 +# is run, the appropriate buildslave is told to execute each Step in turn.
   1.108 +
   1.109 +# the first BuildStep is typically responsible for obtaining a copy of the
   1.110 +# sources. There are source-obtaining Steps in buildbot/steps/source.py for
   1.111 +# CVS, SVN, and others.
   1.112 +
   1.113 +from buildbot.process import factory
   1.114 +from buildbot.steps.shell import Compile
   1.115 +from buildbot.steps.shell import ShellCommand
   1.116 +from buildbot.steps.transfer import FileDownload
   1.117 +from buildbot.steps.source import SVN
   1.118 +from buildbot.process.properties import WithProperties
   1.119 +from buildbot.steps.python_twisted import Trial
   1.120 +from buildbot import locks
   1.121 +
   1.122 +pdb_lock = locks.MasterLock("symbolstore")
   1.123 +
   1.124 +def create_factory(sep, os):
   1.125 +    f1 = factory.BuildFactory()
   1.126 +    f1.addStep(SVN(baseURL          = "svn://svn.alliedmods.net/am/sourcemod/",
   1.127 +                   mode             = "copy"
   1.128 +                  )
   1.129 +              )
   1.130 +    f1.addStep(ShellCommand(
   1.131 +            haltOnFailure           = 1,
   1.132 +            name                    = "bootstrap",
   1.133 +            command                 = ["tools" + sep + "buildbot" + sep + "bootstrap.pl"],
   1.134 +            description             = "bootstrapping",
   1.135 +            descriptionDone         = "bootstrapped"
   1.136 +            ))
   1.137 +    f1.addStep(ShellCommand(
   1.138 +            haltOnFailure           = 1,
   1.139 +            name                    = "build",
   1.140 +            command                 = ["tools" + sep + "buildbot" + sep + "startbuild.pl"],
   1.141 +            description             = "compiling",
   1.142 +            descriptionDone         = "compiled"
   1.143 +            ))
   1.144 +    f1.addStep(ShellCommand(
   1.145 +            haltOnFailure           = 1,
   1.146 +            name                    = "upload",
   1.147 +            command                 = ["tools" + sep + "buildbot" + sep + "package.pl", 
   1.148 +                                       ".." + sep + ".." + sep + "smdrop_info"
   1.149 +                                      ],
   1.150 +            description             = "packaging",
   1.151 +            descriptionDone         = "uploaded"
   1.152 +            ))
   1.153 +    if os == "win32":
   1.154 +        f1.addStep(ShellCommand(
   1.155 +            haltOnFailure           = 1,
   1.156 +            locks                   = [pdb_lock],
   1.157 +            name                    = "symstore",
   1.158 +            command                 = ["tools" + sep + "buildbot" + sep + "symstore.pl"],
   1.159 +            description             = "symstore",
   1.160 +            descriptionDone         = "symstore"
   1.161 +            ))
   1.162 +    return f1
   1.163 +
   1.164 +facWin = create_factory("\\", "win32")
   1.165 +facLinux = create_factory("/", "linux")
   1.166 +
   1.167 +buildLinuxStable = {
   1.168 +        'name':         'linux-stable',
   1.169 +        'slavename':    'linux',
   1.170 +        'builddir':     'linux-stable',
   1.171 +        'factory':      facLinux
   1.172 +      }
   1.173 +buildLinuxTrunk = {
   1.174 +        'name':         "linux-trunk",
   1.175 +        'slavename':    "linux",
   1.176 +        'builddir':     "linux-trunk",
   1.177 +        'factory':      facLinux
   1.178 +      }
   1.179 +buildWindowsStable = {
   1.180 +        'name':         'win32-stable',
   1.181 +        'slavename':    'win32',
   1.182 +        'builddir':     'win32-stable',
   1.183 +        'factory':      facWin
   1.184 +      }
   1.185 +buildWindowsTrunk = {
   1.186 +        'name':         "win32-trunk",
   1.187 +        'slavename':    "win32",
   1.188 +        'builddir':     "win32-trunk",
   1.189 +        'factory':      facWin
   1.190 +      }
   1.191 +c['builders'] = [buildLinuxTrunk, buildWindowsTrunk, buildLinuxStable, buildWindowsStable]
   1.192 +
   1.193 +
   1.194 +####### STATUS TARGETS
   1.195 +
   1.196 +# 'status' is a list of Status Targets. The results of each build will be
   1.197 +# pushed to these targets. buildbot/status/*.py has a variety to choose from,
   1.198 +# including web pages, email senders, and IRC bots.
   1.199 +
   1.200 +c['status'] = []
   1.201 +
   1.202 +from buildbot.status import html
   1.203 +c['status'].append(html.WebStatus(http_port=8010))
   1.204 +
   1.205 +# from buildbot.status import mail
   1.206 +# c['status'].append(mail.MailNotifier(fromaddr="buildbot@localhost",
   1.207 +#                                      extraRecipients=["[email protected]"],
   1.208 +#                                      sendToInterestedUsers=False))
   1.209 +#
   1.210 +# from buildbot.status import words
   1.211 +# c['status'].append(words.IRC(host="irc.example.com", nick="bb",
   1.212 +#                              channels=["#example"]))
   1.213 +#
   1.214 +# from buildbot.status import client
   1.215 +# c['status'].append(client.PBListener(9988))
   1.216 +
   1.217 +
   1.218 +####### DEBUGGING OPTIONS
   1.219 +
   1.220 +# if you set 'debugPassword', then you can connect to the buildmaster with
   1.221 +# the diagnostic tool in contrib/debugclient.py . From this tool, you can
   1.222 +# manually force builds and inject changes, which may be useful for testing
   1.223 +# your buildmaster without actually commiting changes to your repository (or
   1.224 +# before you have a functioning 'sources' set up). The debug tool uses the
   1.225 +# same port number as the slaves do: 'slavePortnum'.
   1.226 +
   1.227 +#c['debugPassword'] = "debugpassword"
   1.228 +
   1.229 +# if you set 'manhole', you can ssh into the buildmaster and get an
   1.230 +# interactive python shell, which may be useful for debugging buildbot
   1.231 +# internals. It is probably only useful for buildbot developers. You can also
   1.232 +# use an authorized_keys file, or plain telnet.
   1.233 +#from buildbot import manhole
   1.234 +#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
   1.235 +#                                       "admin", "password")
   1.236 +
   1.237 +
   1.238 +####### PROJECT IDENTITY
   1.239 +
   1.240 +# the 'projectName' string will be used to describe the project that this
   1.241 +# buildbot is working on. For example, it is used as the title of the
   1.242 +# waterfall HTML page. The 'projectURL' string will be used to provide a link
   1.243 +# from buildbot HTML pages to your project's home page.
   1.244 +
   1.245 +c['projectName'] = "SourceMod"
   1.246 +c['projectURL'] = "http://www.sourcemod.net/"
   1.247 +
   1.248 +# the 'buildbotURL' string should point to the location where the buildbot's
   1.249 +# internal web server (usually the html.Waterfall page) is visible. This
   1.250 +# typically uses the port number set in the Waterfall 'status' entry, but
   1.251 +# with an externally-visible host name which the buildbot cannot figure out
   1.252 +# without some help.
   1.253 +
   1.254 +c['buildbotURL'] = "http://localhost:8010/"