OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from buildbot.changes import svnpoller |
| 6 from buildbot.scheduler import Scheduler |
| 7 |
| 8 from master import build_utils |
| 9 from master import master_utils |
| 10 from master import slaves_list |
| 11 from master.factory import pagespeed_factory |
| 12 |
| 13 import config |
| 14 |
| 15 ActiveMaster = config.Master.PageSpeed |
| 16 |
| 17 # This is the dictionary that the buildmaster pays attention to. We also use |
| 18 # a shorter alias to save typing. |
| 19 c = BuildmasterConfig = {} |
| 20 |
| 21 # Disable compression for the stdio files. |
| 22 c['logCompressionLimit'] = False |
| 23 |
| 24 |
| 25 ####### POLLERS |
| 26 |
| 27 def TreeFileSplitter(path): |
| 28 # List of projects we are interested in. The project names must exactly |
| 29 # match paths in the Subversion repository, relative to the 'path' URL |
| 30 # argument. build_utils.SplitPath() will use them as branch names to |
| 31 # kick off the Schedulers for different projects. |
| 32 projects = ['src'] |
| 33 return build_utils.SplitPath(projects, path) |
| 34 |
| 35 # Polls the svn server every 10 seconds for new changes. |
| 36 pagespeed_rev = 'http://code.google.com/p/page-speed/source/detail?r=%s' |
| 37 trunk_poller = svnpoller.SVNPoller(svnurl="http://page-speed.googlecode.com/svn/
lib/trunk/", |
| 38 split_file=TreeFileSplitter, |
| 39 pollinterval=10, |
| 40 revlinktmpl=pagespeed_rev) |
| 41 |
| 42 c['change_source'] = [trunk_poller] |
| 43 |
| 44 |
| 45 ####### SCHEDULERS |
| 46 |
| 47 ## configure the Schedulers |
| 48 |
| 49 # Main scheduler for all changes in trunk/src. |
| 50 s_src = Scheduler(name='src', |
| 51 branch='src', |
| 52 treeStableTimer=60, |
| 53 builderNames=['Windows XP', |
| 54 'Windows 7', |
| 55 'Lucid 64', |
| 56 'Lucid 32', |
| 57 'Mac 10.6']) |
| 58 |
| 59 c['schedulers'] = [s_src] |
| 60 |
| 61 ####### BUILDERS |
| 62 |
| 63 builders = [] |
| 64 |
| 65 # ---------------------------------------------------------------------------- |
| 66 # FACTORIES |
| 67 |
| 68 m_win = pagespeed_factory.PageSpeedFactory('src/build', 'win32') |
| 69 m_linux = pagespeed_factory.PageSpeedFactory('src/build', 'linux2') |
| 70 m_mac = pagespeed_factory.PageSpeedFactory('src/build', 'darwin') |
| 71 |
| 72 # Some shortcut to simplify the code below. |
| 73 F_WIN = m_win.PageSpeedFactory |
| 74 F_LINUX = m_linux.PageSpeedFactory |
| 75 F_MAC = m_mac.PageSpeedFactory |
| 76 |
| 77 f_linux = F_LINUX('pagespeed-rel-linux', |
| 78 target='Release', |
| 79 options=[], |
| 80 tests=[]) |
| 81 |
| 82 f_win = F_WIN('pagespeed-rel-windows', |
| 83 project='all.sln', |
| 84 target='Release', |
| 85 tests=[]) |
| 86 |
| 87 f_mac = F_MAC('pagespeed-rel-mac', |
| 88 target='Release', |
| 89 options=['--', '-project', 'all.xcodeproj'], |
| 90 tests=[]) |
| 91 |
| 92 |
| 93 # ---------------------------------------------------------------------------- |
| 94 # BUILDER DEFINITIONS |
| 95 |
| 96 b_windows_xp = {'name': 'Windows XP', 'factory': f_win} |
| 97 b_windows_7 = {'name': 'Windows 7', 'factory': f_win} |
| 98 b_lucid_64 = {'name': 'Lucid 64', 'factory': f_linux} |
| 99 b_lucid_32 = {'name': 'Lucid 32', 'factory': f_linux} |
| 100 b_mac10_6 = {'name': 'Mac 10.6', 'factory': f_mac} |
| 101 |
| 102 c['builders'] = [ |
| 103 b_windows_xp, |
| 104 b_windows_7, |
| 105 b_lucid_64, |
| 106 b_lucid_32, |
| 107 b_mac10_6, |
| 108 ] |
| 109 |
| 110 # Associate the slaves to the manual builders. The configuration is in |
| 111 # slaves.cfg. |
| 112 slaves = slaves_list.SlavesList('slaves.cfg', 'PageSpeed') |
| 113 for builder in c['builders']: |
| 114 builder['slavenames'] = slaves.GetSlavesName(builder=builder['name']) |
| 115 |
| 116 ####### BUILDSLAVES |
| 117 |
| 118 # The 'slaves' list defines the set of allowable buildslaves. List all the |
| 119 # slaves registered to a builder. Remove dupes. |
| 120 c['slaves'] = master_utils.AutoSetupSlaves(c['builders'], |
| 121 config.Master.GetBotPassword()) |
| 122 |
| 123 # Make sure everything works together. |
| 124 master_utils.VerifySetup(c, slaves) |
| 125 |
| 126 ####### STATUS TARGETS |
| 127 |
| 128 # Adds common status and tools to this master. |
| 129 master_utils.AutoSetupMaster(c, ActiveMaster) |
| 130 |
| 131 ####### PROJECT IDENTITY |
| 132 |
| 133 # Buildbot master url: |
| 134 c['buildbotURL'] = 'http://build.chromium.org/p/client.pagespeed' |
OLD | NEW |