geriatric/master.cfg
author Aki Sasaki <asasaki@mozilla.com>
Fri, 02 Mar 2012 14:59:15 -0800
branchproduction
changeset 5545 4c144732992ec611cc703801d4d2f1e224bb5613
parent 3156 ad284d4364280457c43bf7b6cd6b92819e7085b1
permissions -rw-r--r--
Added tag FIREFOX_10_0_3esr_RELEASE, FIREFOX_10_0_3esr_BUILD1, FENNEC_10_0_3esr_RELEASE, FENNEC_10_0_3esr_BUILD1 for changeset 6b4f6987ecda

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

c = BuildmasterConfig = {}

import Slaves
import config
reload(Slaves)
reload(config)
from Slaves import slavepassword
from config import branches, slaves
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))

for slave_type in slaves.keys():
    for slave in slaves[slave_type]:
        print 'Creating BuildSlave for %s' % slave
        c['slaves'].append(BuildSlave(slave, slavepassword, max_builds=1))

for branch in branches.keys():
    builders = []
    print 'Branch %s' % branch
    for platform in branches[branch]['platforms'].keys():
        print 'Platform %s' % platform
        platform_builders = []
        for variant in branches[branch]['platforms'][platform]['variants']:
            print 'Variant %s' % variant
            variant_slaves = slaves[variant]
            for suite in branches[branch]['platforms'][platform]['tests']:
                builder_name = '%s-%s-%s %s' % (branch, platform, variant, suite)
                factory = UnittestPackagedBuildFactory(
                            platform=platform,
                            test_suites=(suite,), #factory does for suite in self.test_suites
                            hgHost='hg.mozilla.org',
                            repoPath=branches[branch]['repo_path'],
                            buildToolsRepoPath='build/tools',
                            buildSpace=1
                )
                builder = {
                    'name': builder_name,
                    'slavenames': variant_slaves,
                    'builddir': builder_name,
                    'factory': factory
                }
                builders.append(builder_name)
                platform_builders.append(builder_name)
                c['builders'].append(builder)
        #We are assuming that only Opt builds are tested here.  By hardcoding the
        #-opt-unittest, we don't need to continue having the special geriatric
        #masters sendchange logic in the build master
        scheduler_branch = '%s-%s-opt-unittest' % (branch, platform)
        scheduler = Scheduler(name=scheduler_branch, branch=scheduler_branch,
                            treeStableTimer=5, builderNames=platform_builders,
        )
        print 'Scheduler'
        print scheduler.branch
        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/"