talos-pool/master.cfg
author John Hopkins <jhopkins@mozilla.com>
Mon, 30 Apr 2012 09:49:11 -0400
changeset 5892 d344e17405c7b83018460f420c7da031f0d632c5
parent 2636 0b7b05c44670719e10187c2966a0c61ad74a2423
child 6326 7ec525209823d918c2df8374c04a239db761bacf
permissions -rw-r--r--
copy Thunderbird l10n files under mozilla/ directory (Bug 711534 - Configure Thunderbird release builders) r=standard8

# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory (although the filename
# can be changed with the --basedir option to 'mktap buildbot master').

# It has one job: define a dictionary named BuildmasterConfig. This
# dictionary has a variety of keys to control different aspects of the
# buildmaster. They are documented in docs/config.xhtml .

import os.path
from buildbot.buildslave import BuildSlave
from buildbot.status import html
from buildbot.steps.shell import WithProperties

import buildbotcustom.scheduler
import buildbotcustom.misc
reload(buildbotcustom.scheduler)
reload(buildbotcustom.misc)
from buildbotcustom.scheduler import NoMergeScheduler, NoMergeMultiScheduler, MultiScheduler
from buildbotcustom.misc import generateTalosBranchObjects

# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}

##
## Misc Config
##

c['debugPassword'] = "mozilla"
c['projectName'] = "Talos"
c['projectURL'] = "http://quality.mozilla.org/en/projects/automation/talos"
c['buildbotURL'] = "http://talos-master.mozilla.org:8010"
c['slavePortnum'] = 9010

# Keep 100 changes
c['changeHorizon'] = 100

##
## Status
##

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

from buildbot.status import tinderbox
from buildbot.status.mail import MailNotifier

c['status'].append(MailNotifier(
                       fromaddr="talos.buildbot@build.mozilla.org",
                       sendToInterestedUsers=False,
                       extraRecipients=["joduinn@mozilla.com"],
                       mode="failing",
                       builders=None, # send for all builders
                       relayhost="smtp.mozilla.org"))

import config
reload(config)
from config import *

##
## Slaves
##

import BuildSlaves
reload(BuildSlaves)
from BuildSlaves import SlavePasswords

c['slaves'] = []
for platform, names in SLAVES.items():
    c['slaves'].extend(BuildSlave(name, SlavePasswords[platform], max_builds=1) for name in names)

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

##
## Builders and Schedulers
##

c['schedulers'] = []
c['builders'] = []

# Give the release builders priority over other builders
def prioritizeBuilders(botmaster, builders):
    def sortkey(builder):
        if builder.builder_status.category.endswith('-release'):
            return 0, builder.getOldestRequestTime()
        else:
            return 1, builder.getOldestRequestTime()
    builders.sort(key=sortkey)
    return builders
c['prioritizeBuilders'] = prioritizeBuilders

for branch, branch_config in BRANCHES.items():
    objects = generateTalosBranchObjects(branch, branch_config, PLATFORMS, SUITES, 
                BRANCH_UNITTEST_VARS['platforms'])
    c['builders'].extend(objects['builders'])
    c['schedulers'].extend(objects['schedulers'])
    c['status'].extend(objects['status'])