-
Notifications
You must be signed in to change notification settings - Fork 2
/
master.cfg
168 lines (136 loc) · 6.19 KB
/
master.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# -*- python -*-
# ex: set syntax=python:
c = BuildmasterConfig = {}
####### DB URL
c['db_url'] = "sqlite:///state.sqlite"
####### 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'] = [BuildSlave("local-slave", "password", max_builds=1)]
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()
####### SCHEDULERS
## configure the Schedulers
from buildbot.scheduler import Scheduler
c['schedulers'] = []
c['schedulers'].append(Scheduler(name="all", branch=None,
treeStableTimer=2*60,
builderNames=["linux-test-build"]))
####### BUILDERS
from buildbot.process import factory
from buildbot.steps.shell import ShellCommand
from buildbotcustom.steps import mock
target = 'mozilla-f15-x86_64'
chroot_builddir = '/builds/'
def chroot_to_host(workdir):
return '/builds/targets/%s/%s' % (target, workdir)
host_builddir = chroot_to_host(chroot_builddir)
f1 = factory.BuildFactory()
f1.addStep(mock.MockUtility(action='init',
use_mock=True,
target=target))
f1.addStep(ShellCommand(command=['bash', '-c',
"if [ -d %s/repo ] ; then hg -v pull -u -R %s/repo ; else " % (host_builddir, host_builddir) +
" (cd %s && hg -v clone http://hg.mozilla.org/mozilla-central repo) ; fi" % host_builddir]
))
f1.addStep(ShellCommand(command=['bash', '-c', """cat > %s/repo/.mozconfig << EOF
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options MOZ_OBJDIR="../objdir"
mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'
mk_add_options MOZ_PGO=1
EOF""" % host_builddir]
))
f1.addStep(mock.MockInstall(target=target,
packages=[
'zip',
'autoconf213',
'gtk2-devel',
'libnotify-devel',
'yasm',
'alsa-lib-devel',
'curl-devel',
'wireless-tools-devel',
'libXt-devel',
'mesa-libGL-devel',
'glibc-static',
'libstdc++-static',
]))
f1.addStep(mock.MockCommand(use_mock=True,
target=target,
workdir="%s/repo" % chroot_builddir,
command="make -f client.mk build"))
f1.addStep(mock.MockUtility(action='clean',
target=target))
from buildbot.config import BuilderConfig
b1 = BuilderConfig(name="linux-test-build",
slavename="local-slave",
builddir="builder",
factory=f1)
c['builders'] = [b1]
####### 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
from buildbot.status.web import auth, authz
authz_cfg=authz.Authz(
# change any of these to True to enable; see the manual for more
# options
gracefulShutdown = False,
forceBuild = True,
forceAllBuilds = False,
pingBuilder = False,
stopBuild = True,
stopAllBuilds = False,
cancelPendingBuild = True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
# 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.example.com", nick="bb",
# channels=["#example"]))
# c['status'].append(words.IRC(host="irc.example.com", nick="bb",
# channels=["#example"], useSSL=True))
#
# 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'] = "debugpassword"
# 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'] = "Buildbot"
c['projectURL'] = "http://buildbot.net/"
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.WebStatus 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://localhost:8010/"