talos-pool/master.cfg
author Nick Thomas <nthomas@mozilla.com>
Fri, 04 Sep 2009 17:32:15 +1200
changeset 1484 76a80c926b45e7e88adc8b6ed85243a225da8671
parent 1448 950eb71dd8ae53fb546bf441100668dd6ef73fa7
child 1489 e095d2e1a3447c87a62c1f18d88615ae9483b8b1
permissions -rw-r--r--
Bug 514615, stop lying about start time to try to unbreak MozillaTry waterfall, r=bustage

# 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.process.factory
import buildbotcustom.scheduler
reload(buildbotcustom.process.factory)
reload(buildbotcustom.scheduler)
from buildbotcustom.process.factory import TalosFactory
from buildbotcustom.scheduler import NoMergeScheduler, NoMergeMultiScheduler, MultiScheduler

# 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

##
## 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=["catlee@mozilla.com", "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'] = []

###
### we have to poll ftp for mozilla-1.9.0 builds
###
import ftppoller
reload(ftppoller)
from ftppoller import FtpPoller

for platform in PLATFORMS:
    c['change_source'].append(FtpPoller(
        searchString = BRANCHES['mozilla-1.9.0']['ftp_searchstrings'][platform],
        tree = "Firefox3.0",
        branch = "mozilla-1.9.0-%s" % platform,
        ftpURLs = BRANCHES['mozilla-1.9.0']['ftp_urls'][platform],
        pollInterval = 10 * 60)
    )

for branch, branch_config in BRANCHES.items():
    branchName = branch_config['branch_name']
    buildBranch = branch_config['build_branch']
    branch_builders = []
    for platform, platform_config in PLATFORMS.items():
        chrome_tests, chrome_merge, chrome_addon = branch_config['chrome_tests']
        nochrome_tests, nochrome_merge , nochrome_addon = branch_config['nochrome_tests']
        jss_tests, jss_merge, jss_addon = branch_config['jss_tests']
        dirty_tests, dirty_merge, dirty_addon = \
          branch_config.get('dirty_tests', (0, False, []))
        tp4_tests, tp4_merge, tp4_addon = branch_config['tp4_tests']

        for slave_platform in platform_config['slave_platforms']:
            if chrome_tests:
                factory = TalosFactory(
                    OS=slave_platform,
                    toolsDir="tools",
                    envName=platform_config['env_name'],
                    workdirBase="../talos-data",
                    buildBranch=buildBranch,
                    branchName=branchName,
                    configOptions=TALOS_CONFIG_OPTIONS,
                    talosCmd=TALOS_CMD,
                    fetchSymbols=branch_config['fetch_symbols'],
                    plugins='',
                    pageset='',
                )
                platform_name = platform_config[slave_platform]['name']
                builder = {
                    'name': "%s %s talos" % (platform_name, branch),
                    'slavenames': SLAVES[slave_platform],
                    'builddir': "%s-%s" % (branch, slave_platform),
                    'factory': factory,
                    'category': branch,
                }
                if chrome_merge:
                    scheduler_class = MultiScheduler
                else:
                    scheduler_class = NoMergeMultiScheduler
                s = scheduler_class(name='%s %s scheduler' % (branch, slave_platform),
                              branch='%s-%s' % (branch, platform),
                              treeStableTimer=0,
                              builderNames=[builder['name']],
                              numberOfBuildsToTrigger=chrome_tests,
                              )
                c['schedulers'].append(s)
                c['builders'].append(builder)
                branch_builders.append(builder['name'])

            if nochrome_tests:
                nochrome_factory = TalosFactory(
                    OS=slave_platform,
                    toolsDir="tools",
                    envName=platform_config['env_name'],
                    workdirBase="../talos-data",
                    buildBranch=buildBranch,
                    branchName=branchName,
                    configOptions=TALOS_NOCHROME_CONFIG_OPTIONS,
                    talosCmd=TALOS_CMD,
                    fetchSymbols=branch_config['fetch_symbols'],
                    plugins='',
                    pageset='',
                )
                platform_name = platform_config[slave_platform]['name']
                builder = {
                    'name': "%s %s talos nochrome" % (platform_name, branch),
                    'slavenames': SLAVES[slave_platform],
                    'builddir': "%s-%s-nochrome" % (branch, slave_platform),
                    'factory': nochrome_factory,
                    'category': branch,
                }
                if nochrome_merge:
                    scheduler_class = MultiScheduler
                else:
                    scheduler_class = NoMergeMultiScheduler
                s = scheduler_class(name='%s %s nochrome scheduler' % (branch, slave_platform),
                              branch='%s-%s' % (branch, platform),
                              treeStableTimer=0,
                              builderNames=[builder['name']],
                              numberOfBuildsToTrigger=nochrome_tests,
                              )
                c['schedulers'].append(s)
                c['builders'].append(builder)
                branch_builders.append(builder['name'])

            if jss_tests:
                jss_factory = TalosFactory(
                    OS=slave_platform,
                    toolsDir="tools",
                    envName=platform_config['env_name'],
                    workdirBase="../talos-data",
                    buildBranch=buildBranch,
                    branchName=branchName,
                    configOptions=TALOS_JSS_CONFIG_OPTIONS,
                    talosCmd=TALOS_CMD,
                    fetchSymbols=branch_config['fetch_symbols'],
                    plugins='',
                    pageset='',
                )
                platform_name = platform_config[slave_platform]['name']
                builder = {
                    'name': "%s %s talos jss" % (platform_name, branch),
                    'slavenames': SLAVES[slave_platform],
                    'builddir': "%s-%s-jss" % (branch, slave_platform),
                    'factory': jss_factory,
                    'category': branch,
                }
                if jss_merge:
                    scheduler_class = MultiScheduler
                else:
                    scheduler_class = NoMergeMultiScheduler
                s = scheduler_class(name='%s %s jss scheduler' % (branch, slave_platform),
                              branch='%s-%s' % (branch, platform),
                              treeStableTimer=0,
                              builderNames=[builder['name']],
                              numberOfBuildsToTrigger=jss_tests,
                              )
                c['schedulers'].append(s)
                c['builders'].append(builder)
                branch_builders.append(builder['name'])

            if dirty_tests:
                dirty_factory = TalosFactory(
                    OS=slave_platform,
                    toolsDir="tools",
                    envName=platform_config['env_name'],
                    workdirBase="../talos-data",
                    buildBranch=buildBranch,
                    branchName=branchName,
                    configOptions=TALOS_DIRTY_CONFIG_OPTIONS,
                    talosCmd=TALOS_CMD,
                    fetchSymbols=branch_config['fetch_symbols'],
                    plugins='',
                    pageset='',
                    talosAddOns=dirty_addon,
                )
                platform_name = platform_config[slave_platform]['name']
                builder = {
                    'name': "%s %s talos dirty" % (platform_name, branch),
                    'slavenames': SLAVES[slave_platform],
                    'builddir': "%s-%s-dirty" % (branch, slave_platform),
                    'factory': dirty_factory,
                    'category': branch,
                }
                if dirty_merge:
                    scheduler_class = MultiScheduler
                else:
                    scheduler_class = NoMergeMultiScheduler
                s = scheduler_class(name='%s %s dirty scheduler' % (branch, slave_platform),
                              branch='%s-%s' % (branch, platform),
                              treeStableTimer=0,
                              builderNames=[builder['name']],
                              numberOfBuildsToTrigger=dirty_tests,
                              )
                c['schedulers'].append(s)
                c['builders'].append(builder)
                branch_builders.append(builder['name'])

            if tp4_tests:
                tp4_factory = TalosFactory(
                    OS=slave_platform,
                    toolsDir="tools",
                    envName=platform_config['env_name'],
                    workdirBase="../talos-data",
                    buildBranch=buildBranch,
                    branchName=branchName,
                    configOptions=TALOS_TP4_CONFIG_OPTIONS,
                    talosCmd=TALOS_CMD,
                    fetchSymbols=branch_config['fetch_symbols'],
                )
                platform_name = platform_config[slave_platform]['name']
                builder = {
                    'name': "%s %s talos tp4" % (platform_name, branch),
                    'slavenames': SLAVES[slave_platform],
                    'builddir': "%s-%s-tp4" % (branch, slave_platform),
                    'factory': tp4_factory,
                    'category': branch,
                }
                if tp4_merge:
                    scheduler_class = MultiScheduler
                else:
                    scheduler_class = NoMergeMultiScheduler
                s = scheduler_class(name='%s %s tp4 scheduler' % (branch, slave_platform),
                              branch='%s-%s' % (branch, platform),
                              treeStableTimer=0,
                              builderNames=[builder['name']],
                              numberOfBuildsToTrigger=tp4_tests,
                              )
                c['schedulers'].append(s)
                c['builders'].append(builder)
                branch_builders.append(builder['name'])

    c['status'].append(tinderbox.TinderboxMailNotifier(
                           fromaddr="talos.buildbot@build.mozilla.org",
                           tree=branchName,
                           extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org",],
                           relayhost="smtp.mozilla.org",
                           builders=branch_builders,
                           useChangeTime=False,
                           logCompression="bzip2"))