BuildbotMaster: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
(Replacing page with 'Example master.cfg. Similar to production Testfarm Buildbot master.cfg. please see: [http://lxr.mozilla.org/mozilla/source/tools/buildbot-configs/testing/unittest/master.cfg h...')
 
Line 1: Line 1:
Example master.cfg. Similar to production Testfarm Buildbot master.cfg.
Example master.cfg. Similar to production Testfarm Buildbot master.cfg.


<pre># This is a sample buildmaster config file. It must be installed as
please see: [http://lxr.mozilla.org/mozilla/source/tools/buildbot-configs/testing/unittest/master.cfg http://lxr.mozilla.org/mozilla/source/tools/buildbot-configs/testing/unittest/master.cfg]
# '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.changes.freshcvs import FreshCVSSource
from buildbot.scheduler import Scheduler, Periodic
from buildbot.process import step, factory
from buildbot.status import html
from buildbot.steps.transfer import FileDownload
s = factory.s
 
from mozbuild import *
 
# 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['manhole'] = Manhole(9999, "admin", "password")
c['projectName'] = "Firefox"
c['projectURL'] = "http://mozilla.org/projects/firefox"
c['buildbotURL'] = "http://localhost:5553/"
c['slavePortnum'] = 5555
 
##
## Slaves
##
# (bot-name, bot-password)
c['bots'] = [("win-vc8", "moz"), ("linux","moz"), ("mac-osx", "moz")]
 
##
## Status
##
 
c['status'] = []
c['status'].append(html.Waterfall(http_port=5005))
 
from buildbot.status import tinderbox
 
c['status'].append(tinderbox.TinderboxMailNotifier(
                      fromaddr="buildbot@moz.com",
                      tree="MozillaTest",
                      extraRecipients=["tinderd@tinderbox.moz.org", "rob@mo.com"],
                      relayhost="tbox.mozl.org",
                      logCompression="bzip2"))
 
##
## Sources
##
 
from buildbot.changes import bonsaipoller
 
c['sources'] = []
c['sources'].append(bonsaipoller.BonsaiPoller(
            bonsaiURL = "http://bonsai.mozilla.org",
            module = "SeaMonkeyAll",
            branch = "HEAD",
            pollInterval = 1 * 60))
 
##
## Schedulers
##
 
c['schedulers'] = []
c['schedulers'].append(Scheduler(name="win build scheduler",
                                branch="HEAD",
                                treeStableTimer=5*60,
                                builderNames=["winxp test"]))
c['schedulers'].append(Scheduler(name="fc6 build scheduler",
                                branch="HEAD",
                                treeStableTimer=5*60,
                                builderNames=["fc6 test"]))
c['schedulers'].append(Scheduler(name="osx 10.4 build scheduler",
                                branch="HEAD",
                                treeStableTimer=5*60,
                                builderNames=["osx test"]))
 
# c['schedulers'].append(Periodic("6 hour win build", ["winxp test"], 6*60*60))
# c['schedulers'].append(Periodic("6 hour linux build", ["fc6 test"], 6*60*60))
 
# the 'builders' list defines the Builders. Each one is configured with a
# dictionary, using the following keys:
#  name (required): the name used to describe this bilder
#  slavename (required): which slave to use, must appear in c['bots']
#  builddir (required): which subdirectory to run the builder in
#  factory (required): a BuildFactory to define how the build is run
#  periodicBuildTime (optional): if set, force a build every N seconds
 
builders = []
 
##
## Linux
##
 
firefox_trunk_unix_steps = [
    s(MozillaCheckoutClientMk, workdir="."),
    s(FileDownload, mastersrc="mozconfig-places",
                    slavedest=".mozconfig",
                    workdir="mozilla"),
    s(step.ShellCommand, name="mozconfig contents",
                    command=["cat",".mozconfig"],
                    workdir="mozilla"),
    s(step.Compile, name="checkout",
                    description=["checking out"],
                    descriptionDone = ["checkout"],
                    command=["make","-f","client.mk","checkout"],
                    workdir='mozilla'),
    s(step.ShellCommand, name="clobber",
                        command=["rm","-rfv","objdir"],
                        workdir="mozilla"),
    s(step.Compile, command=["make", "-f", "client.mk", "build"],
                    workdir='mozilla'),
    s(MozillaCheck, warnOnWarnings=True, workdir="mozilla/objdir/"),
    s(MozillaReftest, warnOnWarnings=True,
                    workdir="mozilla/layout/reftests",
                    env=MozillaEnvironments['linux']),
    s(MozillaLinuxMochitest, warnOnWarnings=True,
      workdir="mozilla/objdir/_tests/testing/mochitest",
      env=MozillaEnvironments['linux'])
]
 
firefox_trunk_unix_builder = {
    'name': "fc6 test",
    'slavenames': ['linux'],
    'builddir': "trunk_linux",
    'factory': factory.BuildFactory(firefox_trunk_unix_steps),
    'category': "Firefox"}
 
builders.append(firefox_trunk_unix_builder)
 
##
## Mac OS X
##
 
firefox_trunk_osx_steps = [
    s(MozillaCheckoutClientMk, workdir="."),
    s(FileDownload, mastersrc="mozconfig-places",
                    slavedest=".mozconfig",
                    workdir="mozilla"),
    s(step.ShellCommand, name="mozconfig contents",
                    command=["cat",".mozconfig"],
                    workdir="mozilla"),
    s(step.Compile, name="checkout",
                    description=["checking out"],
                    descriptionDone = ["checkout"],
                    command=["make","-f","client.mk","checkout"],
                    workdir='mozilla'),
    s(step.ShellCommand, name="clobber",
                        command=["rm","-rfv","objdir"],
                        workdir="mozilla"),
    s(step.Compile, command=["make", "-f", "client.mk", "build"],
                    workdir='mozilla'),
    s(MozillaCheck, warnOnWarnings=True, workdir="mozilla/objdir/"),
    s(MozillaOSXReftest, warnOnWarnings=True,
                    workdir="mozilla/layout/reftests",
                    env=MozillaEnvironments['osx'])]
 
firefox_trunk_osx_builder = {
    'name': "osx test",
    'slavenames': ['mac-osx'],
    'builddir': "trunk_osx",
    'factory': factory.BuildFactory(firefox_trunk_osx_steps),
    'category': "Firefox"}
 
builders.append(firefox_trunk_osx_builder)
 
##
## WinXP
##
 
firefox_trunk_winxp_vc8_steps = [
    s(MozillaCheckoutClientMk, workdir=".", env=MozillaEnvironments['vc8']),
    s(FileDownload, mastersrc="mozconfig-places-nonsis",
                    slavedest=".mozconfig",
                    workdir="mozilla"),
    s(step.ShellCommand, name="mozconfig contents",
                        command=["cat",".mozconfig"],
                        workdir="mozilla", env=MozillaEnvironments['vc8']),
    s(step.Compile, name="checkout",
                description=["checking out"],
                descriptionDone = ["checkout"],
                command=["make","-f","client.mk","checkout"],
                workdir='mozilla', env=MozillaEnvironments['vc8']),
    s(step.ShellCommand, name="clobber",
                        command=["rm","-rfv","objdir"],
                        workdir="mozilla", env=MozillaEnvironments['vc8']),
    s(step.Compile, command=["make", "-f", "client.mk", "build"],
                workdir='mozilla', env=MozillaEnvironments['vc8']),
    s(MozillaCheck, warnOnWarnings=True,
                workdir="mozilla/objdir", env=MozillaEnvironments['vc8']),
    s(MozillaWin32Reftest, warnOnWarnings=True,
      workdir="mozilla/layout/reftests",
      env=MozillaEnvironments['vc8']),
    s(MozillaWin32Mochitest, warnOnWarnings=True,
      workdir="mozilla/objdir/_tests/testing/mochitest",
      env=MozillaEnvironments['vc8'])
]
 
firefox_trunk_winxp_builder = {
    'name': "winxp test",
    'slavenames': ['win-vc8'],
    'builddir': "trunk",
    'factory': factory.BuildFactory(firefox_trunk_winxp_vc8_steps),
    'category': "Firefox",
}
 
builders.append(firefox_trunk_winxp_builder)
 
c['builders'] = builders</pre>

Latest revision as of 20:45, 28 April 2008

Example master.cfg. Similar to production Testfarm Buildbot master.cfg.

please see: http://lxr.mozilla.org/mozilla/source/tools/buildbot-configs/testing/unittest/master.cfg