geriatric/master.cfg
author Chris AtLee <catlee@mozilla.com>
Wed, 01 Sep 2010 10:45:05 -0400
changeset 2924 c85fd04505e068d82df3b2213b9c0f9538bc12b4
parent 2422 ca0af754c5ea90db311e93c9582099f2341d1908
child 3153 52521b7625562b5b6d3ffa113e62c85bacdc0b93
permissions -rw-r--r--
Change setup-master.py so it uses master names instead of numbers

# -*- python -*-
# ex: set syntax=python:

c = BuildmasterConfig = {}

import Slaves
import config
reload(Slaves)
reload(config)
from Slaves import slavepassword
from config import platforms 
c['slavePortnum'] = 9989

####### CHANGESOURCES
from buildbot.changes.pb import PBChangeSource
c['change_source'] = []
c['change_source'].append(PBChangeSource())

####### BUILDERS and SCHEDULERS and SLAVES
import buildbot.buildslave
import buildbot.scheduler
import buildbotcustom.steps.misc
import buildbotcustom.process.factory
import buildbotcustom.changes.ftppoller
reload(buildbot.buildslave)
reload(buildbot.scheduler)
reload(buildbotcustom.steps.misc)
reload(buildbotcustom.process.factory)
reload(buildbotcustom.changes.ftppoller)
from buildbot.buildslave import BuildSlave
from buildbot.scheduler import Scheduler
from buildbot.status import html
from buildbot.status.tinderbox import TinderboxMailNotifier
from buildbotcustom.steps.misc import SendChangeStep
from buildbotcustom.process.factory import UnittestPackagedBuildFactory

c['slaves'] = []
c['schedulers'] = []
c['builders'] = []
c['status'] = []
c['status'].append(html.WebStatus(http_port=8010, allowForce=True))

builders = []
for platform in platforms.keys():
    print 'Platform %s' % platform
    platform_builders = []
    for variant in platforms[platform]['variants']:
        print 'Variant %s' % variant
        variant_slaves = []
        for slave in platforms[platform]['variants'][variant]:
            print 'creating slave for variant %s' % variant
            c['slaves'].append(BuildSlave(slave, slavepassword, max_builds=1))
            variant_slaves.append(slave)
    
        for suite in platforms[platform]['tests']:
            builder_name = '%s-%s %s' % (platform, variant, suite)
            print 'Creating builder and factory for %s' % builder_name
            factory = UnittestPackagedBuildFactory(
                        platform=platform,
                        test_suites=(suite,), #factory does for suite in self.test_suites
                        hgHost='hg.mozilla.org',
                        repoPath='check-application.ini',
                        buildToolsRepoPath='build/tools',
                        buildSpace=1
            )
            builder = {
                'name': builder_name,
                'slavenames': variant_slaves,
                'builddir': builder_name,
                'branch': platform,
                'factory': factory
            }
            builders.append(builder_name)
            platform_builders.append(builder_name)
            c['builders'].append(builder)
    scheduler = Scheduler(name=platform, branch=platform,
                        treeStableTimer=0, builderNames=platform_builders,
    )
    c['schedulers'].append(scheduler) 

c['status'].append(TinderboxMailNotifier(
                   fromaddr='mozilla2.buildbot@build.mozilla.org',
                   tree='GeriatricMachines',
                   extraRecipients=['tinderbox-daemon@tinderbox.mozilla.org'],
                   relayhost='mail.build.mozilla.org',
                   builders=builders,
                   logCompression='bzip2'
                   )
            )

####### DEBUGGING OPTIONS
#c['debugPassword'] = "debugpassword"
#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
#                                       "admin", "password")

####### PROJECT IDENTITY
c['projectName'] = "Buildbot"
c['projectURL'] = "http://buildbot.sourceforge.net/"
c['buildbotURL'] = "http://10.250.48.137:8010/"