Browse files

Optimize master-setup builder

  • Loading branch information...
1 parent fd00c20 commit 0481aefaf56d545d1647b968251e726bb959fd11 @rail rail committed Apr 19, 2011
Showing with 15 additions and 21 deletions.
  1. +13 −20 master/master.cfg
  2. +2 −1 master/preproduction_factory.py
View
33 master/master.cfg
@@ -27,6 +27,9 @@ repos = {'build/buildbot': 'default',
'build/buildbot-configs': 'default',
'build/tools': 'default'}
+master_dirs = ('scheduler-master', 'builder-master', 'tests-scheduler-master',
+ 'tests-master')
+
c = BuildmasterConfig = {}
c['projectName'] = "Mozilla"
c['projectURL'] = "http://www.mozilla.org"
@@ -74,36 +77,26 @@ f.tools_run_tests()
f.bbc_run_tests()
for project in ('buildbotcustom',):
f.coverage(project)
-f.run_on_master('/builds/buildbot/buildbotcustom/buildbotcustom', 'hg pull -u')
-f.run_on_master('/builds/buildbot/buildbot-configs', 'hg pull -u')
-f.run_on_master('/builds/buildbot/tools', 'hg pull -u')
-f.run_on_master('/builds/buildbot/scheduler-master', 'make reconfig')
-f.run_on_master('/builds/buildbot/builder-master', 'make reconfig')
-f.run_on_master('/builds/buildbot/tests-scheduler-master', 'make reconfig')
-f.run_on_master('/builds/buildbot/tests-master', 'make reconfig')
+for r in ('buildbotcustom/buildbotcustom', 'buildbot-configs', 'tools'):
+ f.run_on_master('/builds/buildbot/%s' % r, 'hg pull -u')
+
+for d in master_dirs:
+ f.run_on_master('/builds/buildbot/%s' % d, 'make reconfig')
test_masters_builder = BuilderConfig(name='test-masters',
slavename='myself',
builddir='test-masters',
factory=f)
w = PPBuildFactory(HG_HOST)
-w.setup_virtualenv(workdir='/builds/buildbot/scheduler-master/sandbox')
-w.setup_virtualenv(workdir='/builds/buildbot/builder-master/sandbox')
-w.setup_virtualenv(workdir='/builds/buildbot/tests-scheduler-master/sandbox')
-w.setup_virtualenv(workdir='/builds/buildbot/tests-master/sandbox')
-
-w.run_on_master('/builds/buildbot/scheduler-master', 'make stop')
-w.run_on_master('/builds/buildbot/builder-master', 'make stop')
-w.run_on_master('/builds/buildbot/tests-scheduler-master', 'make stop')
-w.run_on_master('/builds/buildbot/tests-master', 'make stop')
+for d in master_dirs:
+ w.run_on_master('/builds/buildbot/%s' % d, 'make stop')
+ w.setup_virtualenv(workdir='/builds/buildbot/%s/sandbox' % d)
w.run_on_master('/builds/buildbot/preproduction', './db-cleanup.py')
-w.run_on_master('/builds/buildbot/scheduler-master', 'make start')
-w.run_on_master('/builds/buildbot/builder-master', 'make start')
-w.run_on_master('/builds/buildbot/tests-scheduler-master', 'make start')
-w.run_on_master('/builds/buildbot/tests-master', 'make start')
+for d in master_dirs:
+ w.run_on_master('/builds/buildbot/%s' % d, 'make start')
setup_masters = {'name': 'setup-masters',
'slavename': 'myself',
View
3 master/preproduction_factory.py
@@ -60,7 +60,7 @@ def __init__(self, hgHost, **kwargs):
workdir=".",
))
- def update_repo(self, repo, branch):
+ def update_repo(self, repo, branch='default'):
workdir = repo.split("/")[-1]
repourl = 'http://%s/%s' % (self.hgHost, repo)
self.addStep(ShellCommand(
@@ -87,6 +87,7 @@ def setup_virtualenv(self, workdir='%(topdir)s/sandbox'):
'buildbot-configs'],
workdir=WithProperties(workdir),
))
+ self.update_repo('build/buildbot-configs')
self.addStep(ShellCommand(
name='setup_sandbox',
command=['make', '-f', 'Makefile.setup',

0 comments on commit 0481aef

Please sign in to comment.