OLD | NEW |
| (Empty) |
1 # -*- python -*- | |
2 # ex: set syntax=python: | |
3 | |
4 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
5 # Use of this source code is governed by a BSD-style license that can be | |
6 # found in the LICENSE file. | |
7 | |
8 # This is the buildmaster config file for the 'nacl' bot. It must | |
9 # be installed as 'master.cfg' in your buildmaster's base directory | |
10 # (although the filename can be changed with the --basedir option to | |
11 # 'mktap buildbot master'). | |
12 | |
13 # It has one job: define a dictionary named BuildmasterConfig. This | |
14 # dictionary has a variety of keys to control different aspects of the | |
15 # buildmaster. They are documented in docs/config.xhtml . | |
16 | |
17 | |
18 from buildbot import locks | |
19 from buildbot.changes import svnpoller | |
20 from buildbot.scheduler import Dependent | |
21 from buildbot.scheduler import Scheduler | |
22 | |
23 # Reload all the python files under master and common | |
24 import master | |
25 reload(master) | |
26 import common | |
27 reload(common) | |
28 | |
29 # These modules come from scripts/master, which must be in the PYTHONPATH. | |
30 import build_utils | |
31 import chromium_step | |
32 import master_utils | |
33 from master.factory import nacl_ports_factory | |
34 import slaves_list | |
35 | |
36 # These modules come from scripts/common, which must be in the PYTHONPATH. | |
37 import chromium_config as config | |
38 import chromium_utils | |
39 | |
40 ActiveMaster = config.Master.NativeClientPorts | |
41 | |
42 TREE_GATE_KEEPER = ActiveMaster.is_production_host | |
43 GOOD_REVISIONS = False | |
44 | |
45 # This is the dictionary that the buildmaster pays attention to. We also use | |
46 # a shorter alias to save typing. | |
47 c = BuildmasterConfig = {} | |
48 | |
49 | |
50 ####### CHANGESOURCES | |
51 | |
52 # the 'change_source' list tells the buildmaster how it should find out about | |
53 # source code changes. Any class which implements IChangeSource can be added | |
54 # to this list: there are several in buildbot/changes/*.py to choose from. | |
55 def NativeClientPortsTreeFileSplitter(path): | |
56 """split_file for the 'src' project in the trunk.""" | |
57 | |
58 projects = ['src'] | |
59 for p in projects: | |
60 if path.startswith(p + '/'): | |
61 return (p, path[len(p)+1:]) | |
62 return None | |
63 | |
64 # Polls config.Master.nacl_trunk_url for changes | |
65 trunk_poller = svnpoller.SVNPoller(svnurl=config.Master.nacl_ports_trunk_url, | |
66 split_file=NativeClientPortsTreeFileSplitter, | |
67 pollinterval=10) | |
68 | |
69 c['change_source'] = [trunk_poller] | |
70 | |
71 | |
72 ####### BUILDERS | |
73 | |
74 # buildbot/process/factory.py provides several BuildFactory classes you can | |
75 # start with, which implement build processes for common targets (GNU | |
76 # autoconf projects, CPAN perl modules, etc). The factory.BuildFactory is the | |
77 # base class, and is configured with a series of BuildSteps. When the build | |
78 # is run, the appropriate buildslave is told to execute each Step in turn. | |
79 | |
80 # the first BuildStep is typically responsible for obtaining a copy of the | |
81 # sources. There are source-obtaining Steps in buildbot/process/step.py for | |
82 # CVS, SVN, and others. | |
83 | |
84 | |
85 # ---------------------------------------------------------------------------- | |
86 # FACTORIES | |
87 | |
88 m_win = nacl_ports_factory.NativeClientPortsFactory( | |
89 'native_client_ports', 'wincyg') | |
90 m_linux = nacl_ports_factory.NativeClientPortsFactory( | |
91 'native_client_ports', 'linux2') | |
92 m_mac = nacl_ports_factory.NativeClientPortsFactory( | |
93 'native_client_ports', 'darwin') | |
94 | |
95 # Some shortcut to simplify the code below. | |
96 F_WIN = m_win.NativeClientPortsFactory | |
97 F_LINUX = m_linux.NativeClientPortsFactory | |
98 F_MAC = m_mac.NativeClientPortsFactory | |
99 | |
100 | |
101 # The identifier of the factory is the build configuration. If two factories | |
102 # are using the same build configuration, they should have the same identifier. | |
103 | |
104 # BuilderTesters using a custom build configuration. | |
105 factories = [] | |
106 # Platforms: | |
107 factories.append(['windows-ports', '1Ports', F_WIN( | |
108 'windows-ports', clobber=True, official_release=True, | |
109 factory_properties={ | |
110 'archive_build': False, | |
111 })]) | |
112 factories.append(['mac-ports', '1Ports', F_MAC( | |
113 'mac-ports', clobber=True, | |
114 factory_properties={ | |
115 'archive_build': False, | |
116 })]) | |
117 factories.append(['linux-ports', '1Ports', F_LINUX( | |
118 'linux-ports', clobber=True, | |
119 factory_properties={ | |
120 'archive_build': False, | |
121 })]) | |
122 | |
123 | |
124 ####### SCHEDULERS | |
125 ## configure the Schedulers | |
126 # Main scheduler for all changes in trunk. | |
127 s_nacl = Scheduler( | |
128 name='nacl', | |
129 branch='src', | |
130 treeStableTimer=60, | |
131 builderNames=[f[0] for f in factories], | |
132 ) | |
133 c['schedulers'] = [s_nacl] | |
134 | |
135 | |
136 # ---------------------------------------------------------------------------- | |
137 # BUILDER DEFINITIONS | |
138 | |
139 # The 'builders' list defines the Builders. Each one is configured with a | |
140 # dictionary, using the following keys: | |
141 # name (required): the name used to describe this bilder | |
142 # slavename (required): which slave to use, must appear in c['slaves'] | |
143 # builddir (required): which subdirectory to run the builder in | |
144 # factory (required): a BuildFactory to define how the build is run | |
145 # periodicBuildTime (optional): if set, force a build every N seconds | |
146 # category (optional): it is not used in the normal 'buildbot' meaning. It is | |
147 # used by gatekeeper to determine which steps it should | |
148 # look for to close the tree. | |
149 # | |
150 | |
151 c['builders'] = [] | |
152 slaves = slaves_list.SlavesList('slaves.cfg', 'NativeClientPorts') | |
153 for f in factories: | |
154 c['builders'].append({ | |
155 'name': f[0], | |
156 'slavenames': slaves.GetSlavesName(builder=f[0]), | |
157 'builddir': f[0], | |
158 'factory': f[2], | |
159 'category': '%s|full' % f[1], | |
160 'auto_reboot': ActiveMaster.is_production_host, | |
161 }) | |
162 | |
163 | |
164 ####### BUILDSLAVES | |
165 | |
166 # The 'slaves' list defines the set of allowable buildslaves. List all the | |
167 # slaves registered to a builder. Remove dupes. | |
168 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], | |
169 config.Master.GetBotPassword()) | |
170 | |
171 # Make sure everything works together. | |
172 master_utils.VerifySetup(c, slaves) | |
173 | |
174 | |
175 ####### STATUS TARGETS | |
176 | |
177 # Adds common status and tools to this master. | |
178 master_utils.AutoSetupMaster(c, ActiveMaster) | |
179 | |
180 if TREE_GATE_KEEPER: | |
181 import gatekeeper | |
182 # This is the list of the builder categories and the corresponding critical | |
183 # steps. If one critical step fails, gatekeeper will close the tree | |
184 # automatically. | |
185 categories_steps = { | |
186 '': ['update scripts', 'update'], | |
187 'full': ['clobber', 'clobber_packages', 'precompile', 'compile', | |
188 'scons_compile', 'gyp_compile', 'build_packages', | |
189 'cooking_tarball', 'selenium', | |
190 'small_tests', 'medium_tests', 'large_tests', | |
191 'hand_tests', 'smoke_tests', | |
192 'backup_plugin', 'install_plugin', 'start_vncserver', | |
193 'stop_vncserver', 'restore_plugin'], | |
194 'experimental': [], | |
195 } | |
196 exclusions = { } | |
197 forgiving_steps = ['update scripts', 'update', 'svnkill', 'taskkill', | |
198 'archived build'] | |
199 c['status'].append(gatekeeper.GateKeeper( | |
200 fromaddr=ActiveMaster.from_address, | |
201 categories_steps=categories_steps, | |
202 exclusions=exclusions, | |
203 relayhost=config.Master.smtp, | |
204 subject='buildbot %(result)s in %(projectName)s on %(builder)s, ' | |
205 'revision %(revision)s', | |
206 extraRecipients=ActiveMaster.tree_closing_notification_recipients, | |
207 tree_status_url=ActiveMaster.tree_status_url, | |
208 lookup=master_utils.FilterDomain(), | |
209 forgiving_steps=forgiving_steps)) | |
210 | |
211 if GOOD_REVISIONS: | |
212 import goodrevisions | |
213 # This is the list of builders with their respective list of critical steps | |
214 # that all need to succeed to mark a revision as successful. A single failure | |
215 # in any of the steps of any of the builders will mark the revision as failed. | |
216 all_steps = [ | |
217 'update', | |
218 'compile', | |
219 'small_tests', | |
220 'medium_tests', | |
221 'large_tests', | |
222 ] | |
223 c['status'].append(goodrevisions.GoodRevisions( | |
224 good_revision_steps={'': all_steps}, | |
225 store_revisions_url=ActiveMaster.store_revisions_url)) | |
226 | |
227 | |
228 ####### PROJECT IDENTITY | |
229 | |
230 # Buildbot master url: | |
231 c['buildbotURL'] = 'http://build.chromium.org:8022/buildbot/waterfall/' | |
OLD | NEW |