mobile-staging/master.cfg
author Philippe M. Chiasson <gozer@mozillamessaging.com>
Sat, 21 Nov 2009 20:09:14 -0500
changeset 1772 9fb2e40ee731a72a446283ddab4946c3d91125ea
parent 1670 f21f4ea81a9869fd0a37fa84195474c9c9e8e25d
child 1916 68826f6f2a9f64e85ce159e1ab68f45defcbe8d6
permissions -rw-r--r--
Bug 524437 - Update files with locales to include in the Thunderbird 3.0 RC1 build. p=sipaq,r=Standard8,gozer

###########################################################################
# mobile-staging master.cfg
###########################################################################

from buildbot.buildslave import BuildSlave
from buildbot.changes.pb import PBChangeSource
from buildbot.scheduler import Scheduler, Periodic
from buildbot.status import html, tinderbox
from buildbot.status.mail import MailNotifier

import buildbotcustom.process.mobiletestfactory
reload(buildbotcustom.process.mobiletestfactory)
from buildbotcustom.process.mobiletestfactory import MaemoUnittestFactory, \
  MobileParseTestLog, MaemoTalosFactory, RebootFactory

import buildbotcustom.changes.mobileftppoller
reload(buildbotcustom.changes.mobileftppoller)
from buildbotcustom.changes.mobileftppoller import MobileFtpPoller

import config
reload(config)
from config import BRANCHES, SLAVES

c = BuildmasterConfig = {}
adminEmails = ['aki@mozilla.com', 'jford@mozilla.com']

c['debugPassword'] = "mozilla"
c['projectName'] = "staging-mobile-master"
c['projectURL'] = "http://staging-mobile-master.mv.mozilla.com:8010/"
c['buildbotURL'] = "http://staging-mobile-master.mv.mozilla.com:8010/"
c['slavePortnum'] = 9010

c['change_source'] = []
c['change_source'].append(PBChangeSource())

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

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

c['status'].append(MailNotifier(
    fromaddr="cltbld@staging-mobile-master.mv.mozilla.com",
    sendToInterestedUsers=False,
    extraRecipients=adminEmails,
    mode="failing",
    builders=None,
    relayhost="smtp.mozilla.org"
))

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

for branchName in sorted(BRANCHES.keys()):
    branch=BRANCHES[branchName]
    unittestBuilders = []
    talosBuilders = []

    for platformName in sorted(branch['platforms'].keys()):
        platform = branch['platforms'][platformName]
        baseName = platform['base_name']

        c['change_source'].append(MobileFtpPoller(
            tree=branchName,
            branch='%s-unit' % platform['buildbot_branch'],
            pollInterval=platform['poll_interval'],
            ftpURLs=platform['unit_build_dirs'],
            searchString=platform['poller_string'],
        ))
        c['change_source'].append(MobileFtpPoller(
            tree=branchName,
            branch='%s-talos' % platform['buildbot_branch'],
            pollInterval=platform['poll_interval'],
            ftpURLs=platform['talos_build_dirs'],
            idleTimeout=2*60*60,
            searchString=platform['poller_string'],
        ))

        # Talos suites
        for talosSuiteName in sorted(platform['talos_suites'].keys()):
            resultsServer = branch['graph_server']
            talosSuite = platform['talos_suites'][talosSuiteName]
            nochrome = False
            if 'nochrome' in talosSuiteName:
                nochrome = True
                talosSuiteName = talosSuiteName.replace('_nochrome','')
            activeTests = { talosSuiteName: talosSuite['timeout'] }
            if 'graph_server' in talosSuite:
                resultsServer = talosSuite['graph_server']
            talosFactory = MaemoTalosFactory(
                activeTests=activeTests,
                talosConfigFile=talosSuite['config_file'],
                resultsServer=resultsServer,
                branch=platform['talos_branch'],
                talosTarball=platform['talos_scripts'],
                pageloaderTarball=platform['talos_pageloader'],
                reboot=True,
                hackTbPrint=0,
                nochrome=nochrome
            )
            talosBuilder = {
                'name': talosSuite['suite_name'],
                'slavenames': platform['slaves'],
                'builddir': talosSuite['build_dir'],
                'factory': talosFactory,
                'category': platform['buildbot_branch'],
            }
            c['builders'].append(talosBuilder)
            talosBuilders.append(talosSuite['suite_name'])

        # Unit test suites
        for testName in sorted(platform['test_suites'].keys()):
            builderName = "%s %s" % (platform['base_name'], testName)
            testSuite = platform['test_suites'][testName]
            testFactory = MaemoUnittestFactory(
                activeTests={testName: testSuite},
                reboot=True
            )
            testBuilder = {
                'name': builderName,
                'slavenames': platform['slaves'],
                'builddir': "%s-%s" % (platform['buildbot_branch'], testName),
                'factory': testFactory,
                'category': platform['buildbot_branch'],
            }
            c['builders'].append(testBuilder)
            unittestBuilders.append(builderName)

    c['schedulers'].append(Scheduler(
        name="%s talos scheduler" % branchName,
        branch='%s-talos' % platform['buildbot_branch'],
        treeStableTimer=5*60,
        builderNames=talosBuilders,
    ))
    c['schedulers'].append(Scheduler(
        name="%s unit scheduler" % branchName,
        branch='%s-unit' % platform['buildbot_branch'],
        treeStableTimer=5*60,
        builderNames=unittestBuilders,
    ))

    c['status'].append(tinderbox.TinderboxMailNotifier(
        fromaddr="mobile.buildbot@build.mozilla.org",
        tree=branch['tinderbox_tree'],
        extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
        relayhost="smtp.mozilla.org",
        builders=talosBuilders,
        logCompression="bzip2"
    ))
    c['status'].append(tinderbox.TinderboxMailNotifier(
        fromaddr="mobile.buildbot@build.mozilla.org",
        tree=branch['tinderbox_tree'],
        extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"],
        relayhost="smtp.mozilla.org",
        builders=unittestBuilders,
        logCompression="bzip2",
        errorparser="unittest"
    ))