Permalink
Browse files

bug 836406 - preproduction should always clobber tools. r=rail

  • Loading branch information...
1 parent ae7cf19 commit ee68cc2426709e7d955b787e219f600448f2f821 @escapewindow escapewindow committed Jan 30, 2013
Showing with 24 additions and 7 deletions.
  1. +17 −6 master/master.cfg
  2. +7 −1 master/preproduction_factory.py
View
@@ -28,10 +28,21 @@ config = {}
# TODO: move steps to class
# TODO: diff pre and production configs, compare with master copy
HG_HOST = 'hg.mozilla.org'
-repos = {'build/buildbot': 'default',
- 'build/buildbotcustom': 'default',
- 'build/buildbot-configs': 'default',
- 'build/tools': 'default'}
+repos = {
+ 'build/buildbot': {
+ 'branch': 'default',
+ },
+ 'build/buildbotcustom': {
+ 'branch': 'default',
+ },
+ 'build/buildbot-configs': {
+ 'branch': 'default',
+ },
+ 'build/tools': {
+ 'branch': 'default',
+ 'clobber': True,
+ },
+}
#master_dirs = ('scheduler-master', 'builder-master', 'tests-scheduler-master',
#'tests-master')
@@ -75,8 +86,8 @@ c['schedulers'].append(Periodic(name='releases',
####### BUILDERS
f = PPBuildFactory(HG_HOST)
-for repo, branch in repos.iteritems():
- f.update_repo(repo, branch)
+for repo in repos.keys():
+ f.update_repo(repo, repos[repo]['branch'], clobber=repos[repo].get('clobber', False))
f.setup_virtualenv()
f.test_masters()
@@ -60,9 +60,15 @@ def __init__(self, hgHost, **kwargs):
workdir=".",
))
- def update_repo(self, repo, branch='default'):
+ def update_repo(self, repo, branch='default', clobber=False):
workdir = repo.split("/")[-1]
repourl = 'http://%s/%s' % (self.hgHost, repo)
+ if clobber:
+ self.addStep(ShellCommand(
+ name='%s_clobber' % workdir,
+ command=['rm', '-rf', workdir],
+ workdir='.',
+ ))
self.addStep(ShellCommand(
name='%s_update' % workdir,
command=['bash', '-c',

0 comments on commit ee68cc2

Please sign in to comment.