# -*- python -*- # 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 buildbotcustom.env import buildbotcustom.tryserver.steps reload(buildbotcustom.env) reload(buildbotcustom.tryserver.steps) from buildbotcustom.env import MozillaEnvironments # This is the dictionary that the buildmaster pays attention to. We also use # a shorter alias to save typing. c = BuildmasterConfig = {} ## ## Misc Config ## c['projectName'] = "Mozilla Try Server" c['projectURL'] = "http://www.mozilla.org" c['buildbotURL'] = "http://sm-try-master.mozilla.org:8010" c['slavePortnum'] = 9982 ## ## Slaves ## # (bot-name, bot-password) c['bots'] = [("linux1", "s3ndch@nge"), ("linux2", "s3ndch@nge"), ("win1", "s3ndch@nge"), ("win2", "s3ndch@nge"), ("mac1", "s3ndch@nge")] from buildbot.locks import SlaveLock linux_lock = SlaveLock("linux-cpu", maxCount=1) mac_lock = SlaveLock("mac-cpu", maxCount=1) win32_lock = SlaveLock("win32-cpu", maxCount=1) ## ## Status ## from buildbot.status.html import Waterfall c['status'] = [] c['status'].append(Waterfall( http_port=8010, css="/builds/buildbot/tryserver-master/waterfall.css", allowForce=True)) # ## Sources ## from buildbot.changes.pb import PBChangeSource c['sources'] = [] c['sources'].append(PBChangeSource()) ## ## Schedulers ## c['schedulers'] = [] # scheduler for sendchange from buildbot.scheduler import Scheduler c['schedulers'].append(Scheduler(name="Sendchange test scheduler", branch="PATCH_TRY", treeStableTimer=3, builderNames=["Try server linux builder", "Try server mac builder", "Try server win32 builder"])) c['schedulers'].append(Scheduler(name="Sendchange hg scheduler", branch="HG_TRY", treeStableTimer=3, builderNames=["Try server linux hg builder", "Try server mac hg builder", "Try server win32 hg builder"])) from buildbot.status.tinderbox import TinderboxMailNotifier c['status'].append(TinderboxMailNotifier( fromaddr="tryserver@build.mozilla.org", tree="MozillaTry", extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org"], relayhost="mail.build.mozilla.org", builders=["Try server linux builder", "Try server mac builder", "Try server win32 builder", "Try server linux hg builder", "Try server mac hg builder", "Try server win32 hg builder"], logCompression="bzip2")) # 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 = [] CVSROOT = ":ext:trybld@cvs.mozilla.org:/cvsroot" OBJDIR = "objdir" PKG_BASENAME = "firefox-try" SCP_STRING = "trybld@build.mozilla.org:/builds/tryserver" from buildbot.process import factory s = factory.s from buildbot.steps.shell import ShellCommand, WithProperties from buildbot.steps.transfer import FileDownload, FileUpload from buildbotcustom.tryserver.steps import * firefox_sendchange_linux_steps = [ s(MozillaTryProcessing), s(ShellCommand, name="remove source and obj dirs", command=["rm", "-rf", "mozilla"], haltOnFailure=True, flunkOnFailure=True, workdir="."), s(ShellCommand, name="dump env vars", workdir=".", command="env | sort"), s(MozillaClientMk, cvsroot=CVSROOT), s(MozillaDownloadMozconfig, mastersrc="mozconfig-linux", patchDir="patches/"), s(ShellCommand, name="source checkout", description=["fetching source"], descriptionDone=["source"], command=["make", "-f", "client.mk", "checkout"], haltOnFailure=True, flunkOnFailure=True, workdir="mozilla", env={'MOZ_CO_PROJECT': 'browser'}), s(MozillaPatchDownload, patchDir="patches/", haltOnFailure=True, flunkOnFailure=True, workdir="mozilla"), s(MozillaCustomPatch, workdir="mozilla", haltOnFailure=True, flunkOnFailure=True), s(ShellCommand, name="mozconfig contents", command=["cat",".mozconfig"], workdir="mozilla"), s(ShellCommand, name="building", description=["building"], descriptionDone=["compile"], command=["make", "-f", "client.mk", "build"], haltOnFailure=True, flunkOnFailure=True, timeout=3600, workdir="mozilla"), s(ShellCommand, name="packaging", description=["creating package"], descriptionDone=["packaging"], command=["make", "package", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-linux" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="mozilla/%s" % OBJDIR), s(ShellCommand, name="chmod package", command=["chmod", "666", WithProperties(''.join(["mozilla/%s/dist/" \ % OBJDIR, "%s", "-%s-linux.tar.bz2" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaCreateUploadDirectory, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/dist" % OBJDIR, baseFilename="%s-linux.tar.bz2" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), ] firefox_sendchange_linux_builder = { 'name': "Try server linux builder", 'slavenames': ['linux1'], 'builddir': "sendchange-linux", 'factory': factory.BuildFactory(firefox_sendchange_linux_steps), 'category': "Sendchange", 'locks': [linux_lock] } builders.append(firefox_sendchange_linux_builder) firefox_sendchange_mac_steps = [ s(MozillaTryProcessing), s(ShellCommand, name="remove source and obj dirs", command=["rm", "-rf", "mozilla"], haltOnFailure=True, flunkOnFailure=True, workdir="."), s(ShellCommand, name="dump env vars", workdir=".", command="env | sort"), s(MozillaClientMk, cvsroot=CVSROOT), s(MozillaDownloadMozconfig, mastersrc="mozconfig-mac", patchDir="patches/"), s(ShellCommand, name="source checkout", description=["fetching source"], descriptionDone=["source"], command=["make", "-f", "client.mk", "checkout"], haltOnFailure=True, flunkOnFailure=True, workdir="mozilla", env={'MOZ_CO_PROJECT': 'browser'}), s(MozillaPatchDownload, patchDir="patches/", haltOnFailure=True, flunkOnFailure=True, workdir="mozilla"), s(MozillaCustomPatch, workdir="mozilla", haltOnFailure=True, flunkOnFailure=True), s(ShellCommand, name="mozconfig contents", command=["cat",".mozconfig"], workdir="mozilla"), s(ShellCommand, name="building", description=["building"], descriptionDone=["compile"], command=["make", "-f", "client.mk", "build"], haltOnFailure=True, flunkOnFailure=True, timeout=3600, workdir="mozilla"), s(ShellCommand, name="packaging", description=["creating package"], descriptionDone=["packaging"], command=["make", "package", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-mac" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="mozilla/%s/ppc" % OBJDIR), s(ShellCommand, name="chmod package", # this gets really ugly here, but it translates to this: # mozilla/$OBJDIR/ppc/dist/$IDENTIFIER-$PKG_BASENAME-mac.dmg command=["chmod", "666", WithProperties(''.join(["mozilla/%s/ppc/dist/" \ % OBJDIR, "%s", "-%s-mac.dmg" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaCreateUploadDirectory, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/ppc/dist" % OBJDIR, baseFilename="%s-mac.dmg" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), ] firefox_sendchange_mac_builder = { 'name': "Try server mac builder", 'slavenames': ['mac1'], 'builddir': "sendchange-mac", 'factory': factory.BuildFactory(firefox_sendchange_mac_steps), 'category': "Sendchange", 'locks': [mac_lock] } builders.append(firefox_sendchange_mac_builder) firefox_sendchange_win32_steps = [ s(MozillaTryProcessing), s(ShellCommand, name="remove source and obj dirs", command=["rmdir", "/s", "/q", "mozilla"], workdir=".", haltOnFailure=False, flunkOnFailure=False, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="dump env vars", workdir=".", command="set | sort", env=MozillaEnvironments['win32-ref-platform']), s(MozillaClientMk, cvsroot=CVSROOT), s(MozillaDownloadMozconfig, mastersrc="mozconfig-win32", patchDir="patches/"), s(ShellCommand, name="source checkout", description=["fetching source"], descriptionDone=["source"], command=["make", "-f", "client.mk", "checkout"], workdir="mozilla", haltOnFailure=True, flunkOnFailure=True, env=MozillaEnvironments['win32-ref-platform']), s(MozillaPatchDownload, patchDir="patches/", haltOnFailure=True, flunkOnFailure=True, workdir="mozilla"), s(MozillaCustomPatch, workdir="mozilla", haltOnFailure=True, flunkOnFailure=True), s(ShellCommand, name="mozconfig contents", command=["cat",".mozconfig"], workdir="mozilla", env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="building", description=["building"], descriptionDone=["compile"], command=["make", "-f", "client.mk", "build"], workdir="mozilla", haltOnFailure=True, flunkOnFailure=True, timeout=3600, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="packaging (zip)", description=["creating package"], descriptionDone=["packaging"], command=["make", "package", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-win32" % PKG_BASENAME]), "identifier")], workdir="mozilla/%s" % OBJDIR, haltOnFailure=False, flunkOnFailure=False, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="chmod package (zip)", command=["chmod", "666", WithProperties(''.join(["mozilla/%s/dist/" \ % OBJDIR, "%s", "-%s-win32.zip" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaCreateUploadDirectory, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/dist" % OBJDIR, # the identifier gets prepended to this in the BuildStep baseFilename="%s-win32.zip" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(ShellCommand, name="packaging (exe)", description=["creating package"], descriptionDone=["packaging"], command=["make", "installer", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-win32" % PKG_BASENAME]), "identifier")], workdir="mozilla/%s" % OBJDIR, haltOnFailure=False, flunkOnFailure=False, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="chmod package (exe)", command=["chmod", "666", WithProperties(''.join(["mozilla/%s/dist/install/sea/" \ % OBJDIR, "%s", "-%s-win32.installer.exe" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/dist/install/sea" % OBJDIR, # the identifier gets prepended to this in the BuildStep baseFilename="%s-win32.installer.exe" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), ] firefox_sendchange_win32_builder = { 'name': "Try server win32 builder", 'slavenames': ['win1', 'win2'], 'builddir': "sendchange-win32", 'factory': factory.BuildFactory(firefox_sendchange_win32_steps), 'category': "Sendchange", 'locks': [win32_lock] } builders.append(firefox_sendchange_win32_builder) firefox_sendchange_hg_linux_steps = [ s(MozillaTryProcessing), s(ShellCommand, name="remove source and obj dirs", command=["rm", "-rf", "mozilla/"], haltOnFailure=True, flunkOnFailure=True, workdir="."), s(ShellCommand, name="dump env vars", workdir=".", command="env | sort"), s(MozillaTryServerHgClone, workdir="mozilla/", repourl="http://hg.mozilla.org/mozilla-central"), s(MozillaTryServerHgCheckout, workdir="mozilla", cvsroot=CVSROOT), s(MozillaDownloadMozconfig, mastersrc="mozconfig-linux", patchDir="patches/"), s(ShellCommand, name="mozconfig contents", command=["cat", ".mozconfig"], workdir="mozilla"), s(ShellCommand, name="building", description=["building"], descriptionDone=["compile"], command=["make", "-f", "client.mk", "build"], haltOnFailure=True, flunkOnFailure=True, timeout=3600, workdir="mozilla"), s(ShellCommand, name="packaging", description=["creating package"], descriptionDone=["packaging"], command=["make", "package", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-linux" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="mozilla/%s" % OBJDIR), s(ShellCommand, name="chmod package", command=["chmod", "666", WithProperties(''.join(["mozilla/%s/dist/" \ % OBJDIR, "%s", "-%s-linux.tar.bz2" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaCreateUploadDirectory, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/dist" % OBJDIR, baseFilename="%s-linux.tar.bz2" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), ] firefox_sendchange_linux_hg_builder = { 'name': "Try server linux hg builder", 'slavenames': ['linux1'], 'builddir': "sendchange-linux-hg", 'factory': factory.BuildFactory(firefox_sendchange_hg_linux_steps), 'category': "Sendchange", 'locks': [linux_lock] } builders.append(firefox_sendchange_linux_hg_builder) firefox_sendchange_hg_mac_steps = [ s(MozillaTryProcessing), s(ShellCommand, name="remove source and obj dirs", command=["rm", "-rf", "mozilla/"], haltOnFailure=True, flunkOnFailure=True, workdir="."), s(ShellCommand, name="dump env vars", workdir=".", command="env | sort"), s(MozillaTryServerHgClone, workdir="mozilla/", repourl="http://hg.mozilla.org/mozilla-central"), s(MozillaTryServerHgCheckout, workdir="mozilla", cvsroot=CVSROOT), s(MozillaDownloadMozconfig, mastersrc="mozconfig-mac", patchDir="patches/"), s(ShellCommand, name="mozconfig contents", command=["cat", ".mozconfig"], workdir="mozilla"), s(ShellCommand, name="building", description=["building"], descriptionDone=["compile"], command=["make", "-f", "client.mk", "build"], haltOnFailure=True, flunkOnFailure=True, timeout=3600, workdir="mozilla"), s(ShellCommand, name="packaging", description=["creating package"], descriptionDone=["packaging"], command=["make", "package", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-mac" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="mozilla/%s/ppc" % OBJDIR), s(ShellCommand, name="chmod package", # this gets really ugly here, but it translates to this: # mozilla/$OBJDIR/ppc/dist/$IDENTIFIER-$PKG_BASENAME-mac.dmg command=["chmod", "666", WithProperties(''.join(["mozilla/%s/ppc/dist/" \ % OBJDIR, "%s", "-%s-mac.dmg" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaCreateUploadDirectory, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/ppc/dist" % OBJDIR, baseFilename="%s-mac.dmg" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), ] firefox_sendchange_mac_hg_builder = { 'name': "Try server mac hg builder", 'slavenames': ['mac1'], 'builddir': "sendchange-mac-hg", 'factory': factory.BuildFactory(firefox_sendchange_hg_mac_steps), 'category': "Sendchange", 'locks': [mac_lock] } builders.append(firefox_sendchange_mac_hg_builder) firefox_sendchange_hg_win32_steps = [ s(MozillaTryProcessing), s(ShellCommand, name="remove source and obj dirs", command=["rm", "-rf", "mozilla/"], haltOnFailure=True, flunkOnFailure=True, workdir=".", env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="dump env vars", workdir=".", command="set | sort", env=MozillaEnvironments['win32-ref-platform']), s(MozillaTryServerHgClone, workdir="mozilla/", repourl="http://hg.mozilla.org/mozilla-central"), s(MozillaTryServerHgCheckout, workdir="mozilla", cvsroot=CVSROOT), s(MozillaDownloadMozconfig, mastersrc="mozconfig-win32", patchDir="patches/"), s(ShellCommand, name="mozconfig contents", command=["cat", ".mozconfig"], workdir="mozilla", env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="building", description=["building"], descriptionDone=["compile"], command=["make", "-f", "client.mk", "build"], haltOnFailure=True, flunkOnFailure=True, workdir="mozilla", timeout=3600, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="packaging (zip)", description=["creating package"], descriptionDone=["packaging"], command=["make", "package", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-win32" % PKG_BASENAME]), "identifier")], workdir="mozilla/%s" % OBJDIR, haltOnFailure=False, flunkOnFailure=False, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="chmod package (zip)", command=["chmod", "666", WithProperties(''.join(["mozilla/%s/dist/" \ % OBJDIR, "%s", "-%s-win32.zip" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaCreateUploadDirectory, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/dist" % OBJDIR, # the identifier gets prepended to this in the BuildStep baseFilename="%s-win32.zip" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), s(ShellCommand, name="packaging (exe)", description=["creating package"], descriptionDone=["packaging"], command=["make", "installer", WithProperties(''.join(["PKG_BASENAME=%s", "-%s-win32" % PKG_BASENAME]), "identifier")], workdir="mozilla/%s" % OBJDIR, haltOnFailure=False, flunkOnFailure=False, env=MozillaEnvironments['win32-ref-platform']), s(ShellCommand, name="chmod package (exe)", command=["chmod", "666", WithProperties(''.join(["mozilla/%s/dist/install/sea/" \ % OBJDIR, "%s", "-%s-win32.installer.exe" % PKG_BASENAME]), "identifier")], haltOnFailure=False, flunkOnFailure=False, workdir="."), s(MozillaUploadTryBuild, slavedir="mozilla/%s/dist/install/sea" % OBJDIR, # the identifier gets prepended to this in the BuildStep baseFilename="%s-win32.installer.exe" % PKG_BASENAME, scpString=SCP_STRING, haltOnFailure=False, flunkOnFailure=False, workdir="."), ] firefox_sendchange_win32_hg_builder = { 'name': "Try server win32 hg builder", 'slavenames': ['win1', 'win2'], 'builddir': "sendchange-win32-hg", 'factory': factory.BuildFactory(firefox_sendchange_hg_win32_steps), 'category': "Sendchange", 'locks': [win32_lock] } builders.append(firefox_sendchange_win32_hg_builder) c['builders'] = builders