~yellow/charms/oneiric/buildbot-master/trunk

« back to all changes in this revision

Viewing changes to configuration/master.cfg.lp

  • Committer: Brad Crittenden
  • Date: 2012-02-03 14:15:31 UTC
  • mto: (10.1.1 generate-slave-names)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: bac@canonical.com-20120203141531-0d6x6qnyv8lvtxgu
Rearranged code in config-changed per review.  Removed merge problem where Config() was still referenced.  Removed unneeded config examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- python -*-
2
 
# ex: set syntax=python:
3
 
 
4
 
# This is a sample buildmaster config file. It must be installed as
5
 
# 'master.cfg' in your buildmaster's base directory.
6
 
 
7
 
# This is the dictionary that the buildmaster pays attention to. We also use
8
 
# a shorter alias to save typing.
9
 
c = BuildmasterConfig = {}
10
 
 
11
 
####### BUILDSLAVES
12
 
 
13
 
# The 'slaves' list defines the set of recognized buildslaves. Each element is
14
 
# a BuildSlave object, specifying a username and password.  The same username and
15
 
# password must be configured on the slave.
16
 
from buildbot.buildslave import BuildSlave
17
 
c['slaves'] = [BuildSlave("example-slave", "launchpad")]
18
 
 
19
 
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
20
 
# This must match the value configured into the buildslaves (with their
21
 
# --master option)
22
 
c['slavePortnum'] = 9989
23
 
 
24
 
####### CHANGESOURCES
25
 
 
26
 
# the 'change_source' setting tells the buildmaster how it should find out
27
 
# about source code changes.  Here we point to the buildbot clone of pyflakes.
28
 
 
29
 
from buildbot.changes.gitpoller import GitPoller
30
 
c['change_source'] = GitPoller(
31
 
        'git://github.com/buildbot/pyflakes.git',
32
 
        branch='master', pollinterval=1200)
33
 
 
34
 
####### SCHEDULERS
35
 
 
36
 
# Configure the Schedulers, which decide how to react to incoming changes.  In this
37
 
# case, just kick off a 'runtests' build
38
 
 
39
 
from buildbot.scheduler import Scheduler
40
 
c['schedulers'] = []
41
 
c['schedulers'].append(Scheduler(name="all", branch=None,
42
 
                                 treeStableTimer=None,
43
 
                                 builderNames=["runtests"]))
44
 
 
45
 
####### BUILDERS
46
 
 
47
 
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
48
 
# what steps, and which slaves can execute them.  Note that any particular build will
49
 
# only take place on one slave.
50
 
 
51
 
from buildbot.process.factory import BuildFactory
52
 
from buildbot.steps.source import Git
53
 
from buildbot.steps.shell import ShellCommand
54
 
 
55
 
factory = BuildFactory()
56
 
# check out the source
57
 
factory.addStep(Git(repourl='git://github.com/buildbot/pyflakes.git', mode='copy'))
58
 
# run the tests (note that this will require that 'trial' is installed)
59
 
factory.addStep(ShellCommand(command=["trial", "pyflakes"]))
60
 
 
61
 
from buildbot.config import BuilderConfig
62
 
 
63
 
c['builders'] = []
64
 
c['builders'].append(
65
 
    BuilderConfig(name="runtests",
66
 
      slavenames=["example-slave"],
67
 
      factory=factory))
68
 
 
69
 
####### STATUS TARGETS
70
 
 
71
 
# 'status' is a list of Status Targets. The results of each build will be
72
 
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
73
 
# including web pages, email senders, and IRC bots.
74
 
 
75
 
c['status'] = []
76
 
 
77
 
from buildbot.status import html
78
 
from buildbot.status.web import auth, authz
79
 
authz_cfg=authz.Authz(
80
 
    # change any of these to True to enable; see the manual for more
81
 
    # options
82
 
    gracefulShutdown = False,
83
 
    forceBuild = True, # use this to test your slave once it is set up
84
 
    forceAllBuilds = False,
85
 
    pingBuilder = False,
86
 
    stopBuild = False,
87
 
    stopAllBuilds = False,
88
 
    cancelPendingBuild = False,
89
 
)
90
 
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
91
 
 
92
 
####### PROJECT IDENTITY
93
 
 
94
 
# the 'projectName' string will be used to describe the project that this
95
 
# buildbot is working on. For example, it is used as the title of the
96
 
# waterfall HTML page. The 'projectURL' string will be used to provide a link
97
 
# from buildbot HTML pages to your project's home page.
98
 
 
99
 
c['projectName'] = "Pyflakes"
100
 
c['projectURL'] = "http://divmod.org/trac/wiki/DivmodPyflakes"
101
 
 
102
 
# the 'buildbotURL' string should point to the location where the buildbot's
103
 
# internal web server (usually the html.WebStatus page) is visible. This
104
 
# typically uses the port number set in the Waterfall 'status' entry, but
105
 
# with an externally-visible host name which the buildbot cannot figure out
106
 
# without some help.
107
 
 
108
 
c['buildbotURL'] = "http://localhost:8010/"
109
 
 
110
 
####### DB URL
111
 
 
112
 
# This specifies what database buildbot uses to store change and scheduler
113
 
# state.  You can leave this at its default for all but the largest
114
 
# installations.
115
 
c['db_url'] = "sqlite:///state.sqlite"