Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Optimize master-setup builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Rail Aliev committed Apr 19, 2011
1 parent fd00c20 commit 0481aef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
33 changes: 13 additions & 20 deletions master/master.cfg
Expand Up @@ -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"
Expand Down Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion master/preproduction_factory.py
Expand Up @@ -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(
Expand All @@ -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',
Expand Down

0 comments on commit 0481aef

Please sign in to comment.