mozilla-tests/tests_master.cfg
author Aki Sasaki <asasaki@mozilla.com>
Fri, 02 Mar 2012 14:59:15 -0800
branchproduction
changeset 5545 4c144732992ec611cc703801d4d2f1e224bb5613
parent 5113 9c3e5ffcb2be4b1fb401f133f67691cfe26bb4b4
child 5566 eabbeca0c530eb64b47ed24f876f0346f44b91fc
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

# vim: ft=python
from copy import deepcopy

# import/reload dance so that reconfigs work
import buildbotcustom.misc
import master_common
import config
import master_localconfig
reload(buildbotcustom.misc)
reload(master_common)
reload(config)
reload(master_localconfig)

from master_common import BuildmasterConfig
c = BuildmasterConfig
for key, value in master_localconfig.BuildmasterConfig.items():
    if key in c:
        c[key].extend(value)
    else:
        c[key] = value

# Create our QueueDir objects
# This is reloaded in buildbotcustom.misc
from mozilla_buildtools.queuedir import QueueDir
commandsQueue = QueueDir('commands', '%s/commands' % master_localconfig.QUEUEDIR)

from config import BRANCHES, PLATFORMS, SUITES, BRANCH_UNITTEST_VARS, SLAVES, TRY_SLAVES, PROJECTS
from master_localconfig import ACTIVE_BRANCHES, ACTIVE_PLATFORMS, ACTIVE_PROJECTS

import BuildSlaves
reload(BuildSlaves)
from BuildSlaves import SlavePasswords
from buildbot.buildslave import BuildSlave

# Handle active platforms
all_slave_platforms = []
for p in ACTIVE_PLATFORMS.keys():
     ACTIVE_PLATFORMS[p] = deepcopy(PLATFORMS[p])
     all_slave_platforms.extend(PLATFORMS[p]['slave_platforms'])

# Remove non-active platform entries for projects
for p in PROJECTS:
    if 'platforms' in PROJECTS[p]:
        for project_slave_platform in PROJECTS[p]['platforms'].keys():
            if project_slave_platform not in all_slave_platforms:
                del PROJECTS[p]['platforms'][project_slave_platform]

for slave_platform, slaves in SLAVES.items():
    # If this platform isn't active, skip it!
    if slave_platform not in all_slave_platforms:
        continue
    for name in sorted(slaves.keys()):
        c['slaves'].append(BuildSlave(name, SlavePasswords[slave_platform], max_builds=1,
                                      properties=slaves[name]))

if 'try' in ACTIVE_BRANCHES:
    for slave_platform, slaves in TRY_SLAVES.items():
        # If this platform isn't active, skip it!
        if slave_platform not in all_slave_platforms:
            continue
        for name in sorted(slaves.keys()):
            c['slaves'].append(BuildSlave(name, SlavePasswords[slave_platform], max_builds=1,
                                          properties=slaves[name]))

from buildbotcustom.misc import generateTalosBranchObjects, generateProjectObjects, \
         mergeBuildObjects

from buildbot.schedulers.triggerable import Triggerable

buildObjects = {}

for branch in ACTIVE_BRANCHES:
    talosObjects = generateTalosBranchObjects(branch, BRANCHES[branch],
                                                ACTIVE_PLATFORMS, BRANCHES[branch].get('suites', SUITES),
                                                BRANCH_UNITTEST_VARS['platforms'])
    buildObjects = mergeBuildObjects(buildObjects, talosObjects)

for project in ACTIVE_PROJECTS:
    projectObjects = generateProjectObjects(project, PROJECTS[project], SLAVES)
    buildObjects = mergeBuildObjects(buildObjects, projectObjects)

# We only want builders, status objects
c['builders'].extend(buildObjects['builders'])
c['status'].extend(buildObjects['status'])
# We need just the triggerable schedulers here
for s in buildObjects['schedulers']:
    if isinstance(s, Triggerable):
        c['schedulers'].append(s)

# Required for sendchange
from buildbot.changes.pb import PBChangeSource
c['change_source'].append(PBChangeSource())

import passwords
reload(passwords)
from passwords import BBDB_URL
c['db_url'] = BBDB_URL
c['db_poll_interval'] = 60
c['multiMaster'] = True

c['mergeRequests'] = buildbotcustom.misc.mergeRequests

if hasattr(passwords, 'PULSE_PASSWORD'):
    pulseQueue = QueueDir('pulse', '%s/pulse' % master_localconfig.QUEUEDIR)
    # Send pulse messages
    import re
    import buildbotcustom.status.pulse
    reload(buildbotcustom.status.pulse)
    from buildbotcustom.status.pulse import PulseStatus
    c['status'].append(PulseStatus(
        pulseQueue,
        ignoreBuilders=[re.compile('.*shadow-central.*'), re.compile('fuzzer-.*')],
        send_logs=False,
        ))

# c is shorthand for BuildmasterConfig, so make sure they still refer to the
# same thing
assert c is BuildmasterConfig