bug 377929: mozilla2 buildbot master setup - make locks work; remove old builds. r=nthomas, patch=me
authorbhearsum@mozilla.com
Wed, 20 Feb 2008 07:35:51 -0500
changeset 4 9d16335457f14aa43a2058405c195a220e8d0b68
parent 3 7b01640de0e371eca35b9017bb3ade3a8a0d4369
child 5 09de4f042179037cbca67607af691bc773a3f812
push id1
push userbhearsum@mozilla.com
push dateMon, 07 Apr 2008 12:22:19 +0000
reviewersnthomas
bugs377929
bug 377929: mozilla2 buildbot master setup - make locks work; remove old builds. r=nthomas, patch=me
mozilla2/master.cfg
--- a/mozilla2/master.cfg
+++ b/mozilla2/master.cfg
@@ -70,16 +70,20 @@ reload(buildbotcustom)
 
 from buildbotcustom.steps.misc import GetBuildID
 from buildbotcustom.steps.transfer import MozillaStageUpload
 
 c['sources'] = []
 c['schedulers'] = []
 c['builders'] = []
 
+locks = {'linux': SlaveLock(name='linux', maxCount=1),
+         'win32': SlaveLock(name='win32', maxCount=1),
+         'macosx': SlaveLock(name='macosx', maxCount=1)}
+
 for name in BRANCHES.keys():
     # shorthand
     branch = BRANCHES[name]
     builders = []
     nightlyBuilders = []
     # generate a list of builders, nightly builders (names must be different)
     # for easy access
     for platform in branch['platforms'].keys():
@@ -110,20 +114,24 @@ for name in BRANCHES.keys():
     c['schedulers'].append(Periodic(
         name='%s periodic' % name,
         builderNames=builders,
         branch=name,
         periodicBuildTimer=60*20
     ))
 
     for platform in branch['platforms'].keys():
-        # make sure nightly and dep don't run at the same time
-        lock = SlaveLock(name=platform, maxCount=1)
-
         mozilla2_dep_factory = factory.BuildFactory()
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command="rm -rfv %s/dist/firefox-* %s/dist/install/sea/*.exe" %
+                     (OBJDIR, OBJDIR),
+            env=branch['platforms'][platform]['env'],
+            description=['deleting', 'old', 'package'],
+            descriptionDone=['delete', 'old', 'package']
+        ))
         mozilla2_dep_factory.addStep(Mercurial(
             mode='update',
             baseURL=HGURL,
             defaultBranch=name
         ))
         mozilla2_dep_factory.addStep(ShellCommand(
             command=['python', 'client.py', '--cvsroot=%s' % CVSROOT,
                      WithProperties('--mozilla-repo=' + HGURL + '%(branch)s'),
@@ -194,17 +202,17 @@ for name in BRANCHES.keys():
 
 
         mozilla2_dep_builder = {
             'name': '%s-%s' % (name, platform),
             'slavenames': branch['platforms'][platform]['slaves'],
             'builddir': '%s-%s' % (name, platform),
             'factory': mozilla2_dep_factory,
             'category': name,
-            'locks': [lock]
+            'locks': [ locks[platform] ]
         }
         c['builders'].append(mozilla2_dep_builder)
 
         # TODO: does all of this have to be repeated? the only change is 'mode'
         mozilla2_nightly_factory = factory.BuildFactory()
         mozilla2_nightly_factory.addStep(Mercurial(
             mode='clobber',
             baseURL=HGURL,
@@ -279,17 +287,17 @@ for name in BRANCHES.keys():
         ))
 
         mozilla2_nightly_builder = {
             'name': '%s-%s-nightly' % (name, platform),
             'slavenames': branch['platforms'][platform]['slaves'],
             'builddir': '%s-%s-nightly' % (name, platform),
             'factory': mozilla2_nightly_factory,
             'category': name,
-            'locks': [lock]
+            'locks': [ locks[platform] ]
         }
         c['builders'].append(mozilla2_nightly_builder)
 
 
 ####### STATUS TARGETS
 
 c['status'] = []