Basic Mozilla2 configs
authorbhearsum@bitters.local
Wed, 13 Feb 2008 09:14:59 -0500
changeset 0 584471372a7e1820758e50b1b5938ee7b46e7d72
child 1 b01dfcc3e68f456217501ea006fdf19887ad3a09
push id1
push userbhearsum@mozilla.com
push dateMon, 07 Apr 2008 12:22:19 +0000
Basic Mozilla2 configs
mozilla2/linux/mozconfig
mozilla2/macosx/mozconfig
mozilla2/master.cfg
mozilla2/public_html/buildbot.css
mozilla2/win32/mozconfig
new file mode 100644
--- /dev/null
+++ b/mozilla2/linux/mozconfig
@@ -0,0 +1,6 @@
+ac_add_options --enable-application=browser
+ac_add_options --enable-optimize="-Os -gstabs+"
+ac_add_options --disable-debug
+
+CC=/tools/gcc/bin/gcc
+CXX=/tools/gcc/bin/g++
new file mode 100644
--- /dev/null
+++ b/mozilla2/macosx/mozconfig
@@ -0,0 +1,1 @@
+ac_add_options --enable-application=browser
new file mode 100644
--- /dev/null
+++ b/mozilla2/master.cfg
@@ -0,0 +1,279 @@
+# -*- python -*-
+# ex: set syntax=python:
+
+# Shorthand
+c = BuildmasterConfig = {}
+
+####### BUILDSLAVES
+
+import BuildSlaves
+reload(BuildSlaves)
+c['slaves'] = BuildSlaves.SlaveList
+
+# 'slavePortnum' defines the TCP port to listen on. This must match the value
+# configured into the buildslaves (with their --master option)
+
+c['slavePortnum'] = 9989
+
+
+####### SCHEDULERS, CHANGE SOURCES, AND BUILDERS
+
+HGURL = 'http://hg.mozilla.org/'
+# for nss/nspr
+CVSROOT = ':ext:stgbld@cvs.mozilla.org:/cvsroot'
+# TODO: update this after production repo is created
+CONFIG_REPO_URL = 'http://hg.mozilla.org/build/buildbot-configs/mozilla2'
+OBJDIR = 'obj-firefox'
+STAGE_USERNAME = 'ffxbld'
+STAGE_SERVER = 'stage.mozilla.org'
+# TODO: update this soon
+STAGE_BASE_PATH = '/home/ffxbld/moz2-builds'
+STAGE_GROUP = None
+STAGE_SSH_KEY = 'ffxbld_dsa'
+BRANCHES = {'mozilla-central': {}}
+BRANCHES['mozilla-central']['platforms'] = {'linux': {}, 'win32': {}, 'macosx': {}}
+BRANCHES['mozilla-central']['platforms']['linux']['slaves'] = ['moz2-linux-slave1']
+BRANCHES['mozilla-central']['platforms']['win32']['slaves'] = ['moz2-win32-slave1']
+BRANCHES['mozilla-central']['platforms']['macosx']['slaves'] = ['moz2-mac-slave1']
+BRANCHES['mozilla-central']['platforms']['linux']['env'] = {
+    'MOZ_OBJDIR': OBJDIR
+}
+BRANCHES['mozilla-central']['platforms']['win32']['env'] = {'CVS_RSH': 'ssh',
+    'MOZ_OBJDIR': OBJDIR
+}
+BRANCHES['mozilla-central']['platforms']['macosx']['env'] = {
+    'MOZ_OBJDIR': OBJDIR
+}
+
+
+from buildbot.process import factory
+from buildbot.changes.hgpoller import HgPoller
+from buildbot.scheduler import Scheduler, Nightly, Periodic
+from buildbot.steps.source import Mercurial
+from buildbot.steps.transfer import FileDownload
+from buildbot.steps.shell import Compile, ShellCommand, WithProperties
+from buildbot.locks import SlaveLock
+
+import buildbotcustom
+reload(buildbotcustom)
+
+from buildbotcustom.steps.misc import GetBuildID
+from buildbotcustom.steps.transfer import MozillaStageUpload
+
+c['sources'] = []
+c['schedulers'] = []
+c['builders'] = []
+
+for name in BRANCHES.keys():
+    # shorthand
+    branch = BRANCHES[name]
+    builders = []
+    nightlyBuilders = []
+    # generate a list of builders, nightly builders (names must be different)
+    # for easy access
+    for platform in branch['platforms'].keys():
+        builders.append('%s-%s' % (name, platform))
+        nightlyBuilders.append('%s-%s-nightly' % (name, platform))
+
+    # change sources
+    c['sources'].append(HgPoller(
+        hgURL=HGURL,
+        branch=name,
+        pollInterval=1*60
+    ))
+
+    # schedulers
+    c['schedulers'].append(Scheduler(
+        name=name,
+        branch=name,
+        treeStableTimer=3*60,
+        builderNames=builders
+    ))
+    c['schedulers'].append(Nightly(
+        name='%s nightly' % name,
+        branch=name,
+        hour=[2],
+        builderNames=nightlyBuilders
+    ))
+
+    for platform in branch['platforms'].keys():
+        # make sure nightly and dep don't run at the same time
+        lock = SlaveLock(name=platform, maxCount=1)
+
+        mozilla2_dep_factory = factory.BuildFactory()
+        mozilla2_dep_factory.addStep(Mercurial(
+            mode='update',
+            baseURL=HGURL,
+            defaultBranch=name
+        ))
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command=['python', 'client.py', '--cvsroot=%s' % CVSROOT,
+                     WithProperties('--mozilla-repo=' + HGURL + '%(branch)s'),
+                     'checkout'],
+            env=branch['platforms'][platform]['env'],
+            haltOnFailure=True
+        ))
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command=['rm', '-rfv', 'configs'],
+            haltOnFailure=True
+        ))
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command=['hg', 'clone', CONFIG_REPO_URL, 'configs'],
+            haltOnFailure=True
+        ))
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command=['cp', 'configs/%s/mozconfig' % platform, '.mozconfig'],
+            haltOnFailure=True
+        ))
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command=['cat', '.mozconfig'],
+        ))
+        mozilla2_dep_factory.addStep(Compile(
+            command=['make', '-f', 'client.mk', 'build'],
+            env=branch['platforms'][platform]['env'],
+            haltOnFailure=True
+        ))
+        mozilla2_dep_factory.addStep(ShellCommand(
+            command=['make', 'package'],
+            workdir='build/%s' % OBJDIR,
+            haltOnFailure=True
+        ))
+        if platform == "win32":
+            mozilla2_dep_factory.addStep(ShellCommand(
+                command=['make', 'installer'],
+                workdir='build/%s' % OBJDIR,
+                haltOnFailure=True
+            ))
+        mozilla2_dep_factory.addStep(GetBuildID(
+                objdir=OBJDIR
+        ))
+        mozilla2_dep_factory.addStep(MozillaStageUpload(
+                objdir=OBJDIR,
+                username=STAGE_USERNAME,
+                milestone=name,
+                remoteHost=STAGE_SERVER,
+                remoteBasePath=STAGE_BASE_PATH,
+                platform=platform,
+                group=STAGE_GROUP,
+                sshKey=STAGE_SSH_KEY,
+                releaseToLatest=False,
+                releaseToDated=False,
+                releaseToTinderboxBuilds=True
+        ))
+
+        mozilla2_dep_builder = {
+            'name': '%s-%s' % (name, platform),
+            'slavenames': branch['platforms'][platform]['slaves'],
+            'builddir': '%s-%s' % (name, platform),
+            'factory': mozilla2_dep_factory,
+            'category': name,
+            'locks': [lock]
+        }
+        c['builders'].append(mozilla2_dep_builder)
+
+        # TODO: does all of this have to be repeated? the only change is 'mode'
+        mozilla2_nightly_factory = factory.BuildFactory()
+        mozilla2_nightly_factory.addStep(Mercurial(
+            mode='clobber',
+            baseURL=HGURL,
+            defaultBranch=name
+        ))
+        mozilla2_nightly_factory.addStep(ShellCommand(
+            command=['python', 'client.py', '--cvsroot=%s' % CVSROOT,
+                     WithProperties('--mozilla-repo=' + HGURL + '%(branch)s'),
+                     'checkout'],
+            env=branch['platforms'][platform]['env'],
+            haltOnFailure=True
+        ))
+        mozilla2_nightly_factory.addStep(ShellCommand(
+            command=['rm', '-rfv', 'configs'],
+            haltOnFailure=True
+        ))
+        mozilla2_nightly_factory.addStep(ShellCommand(
+            command=['hg', 'clone', CONFIG_REPO_URL, 'configs'],
+            haltOnFailure=True
+        ))
+        mozilla2_nightly_factory.addStep(ShellCommand(
+            command=['cp', 'configs/%s/mozconfig' % platform, '.mozconfig'],
+            haltOnFailure=True
+        ))
+        mozilla2_nightly_factory.addStep(ShellCommand(
+            command=['cat', '.mozconfig'],
+        ))
+        mozilla2_nightly_factory.addStep(Compile(
+            command=['make', '-f', 'client.mk', 'build'],
+            env=branch['platforms'][platform]['env'],
+            haltOnFailure=True
+        ))
+        mozilla2_nightly_factory.addStep(ShellCommand(
+            command=['make', 'package'],
+            workdir='build/%s' % OBJDIR,
+            haltOnFailure=True
+        ))
+        if platform == "win32":
+            mozilla2_nightly_factory.addStep(ShellCommand(
+                command=['make', 'installer'],
+                workdir='build/%s' % OBJDIR,
+                haltOnFailure=True
+            ))
+        mozilla2_nightly_factory.addStep(GetBuildID(
+                objdir=OBJDIR
+        ))
+        mozilla2_nightly_factory.addStep(MozillaStageUpload(
+                objdir=OBJDIR,
+                username=STAGE_USERNAME,
+                milestone=name,
+                remoteHost=STAGE_SERVER,
+                remoteBasePath=STAGE_BASE_PATH,
+                platform=platform,
+                group=STAGE_GROUP,
+                sshKey=STAGE_SSH_KEY,
+                releaseToDated=True,
+                releaseToLatest=True,
+                releaseToTinderboxBuilds=True
+        ))
+
+        mozilla2_nightly_builder = {
+            'name': '%s-%s-nightly' % (name, platform),
+            'slavenames': branch['platforms'][platform]['slaves'],
+            'builddir': '%s-%s-nightly' % (name, platform),
+            'factory': mozilla2_nightly_factory,
+            'category': name,
+            'locks': [lock]
+        }
+        c['builders'].append(mozilla2_nightly_builder)
+
+
+####### STATUS TARGETS
+
+c['status'] = []
+
+from buildbot.status import html
+
+# This one's private.
+c['status'].append(html.WebStatus(
+    http_port=8010, allowForce=True
+))
+# This one's public.
+c['status'].append(html.WebStatus(
+    distrib_port=8011, allowForce=False
+))
+
+
+####### PROJECT IDENTITY
+
+# the 'projectName' string will be used to describe the project that this
+# buildbot is working on. For example, it is used as the title of the
+# waterfall HTML page. The 'projectURL' string will be used to provide a link
+# from buildbot HTML pages to your project's home page.
+
+c['projectName'] = "Mozilla 2"
+c['projectURL'] = "http://wiki.mozilla.org/Mozilla_2"
+
+# the 'buildbotURL' string should point to the location where the buildbot's
+# internal web server (usually the html.Waterfall page) is visible. This
+# typically uses the port number set in the Waterfall 'status' entry, but
+# with an externally-visible host name which the buildbot cannot figure out
+# without some help.
+
+c['buildbotURL'] = "http://staging-master.build.mozilla.org:8010/"
new file mode 100644
--- /dev/null
+++ b/mozilla2/public_html/buildbot.css
@@ -0,0 +1,64 @@
+body {
+    background: url("http://www.mozilla.org/images/mozilla-banner.gif") 
+                no-repeat top left;
+    font-family: Verdana, Courier, sans-sarif;
+    font-size: 80%;
+    padding-top: 80px;
+}
+
+a:link, a:visited {
+    color: #000;
+}
+
+td.Event, td.BuildStep, td.Activity, td.Change, td.Time, td.Builder, td.LastBuild {
+    border: 1px solid #777;
+}
+
+td.Event, td.Change, td.Time, td.Builder {
+    background-color: #F3F3F3;
+}
+
+td.green {
+    background-color: #72ff75;
+}
+
+.table {
+    /* border-spacing: 2px; */
+    border-spacing: 0px;
+    width: 1%;
+    border-collapse: seperate;
+}
+
+td {
+    padding: 0.5ex 1ex;
+    text-align: center;
+    border: 1px solid #DDD;
+}
+
+/* Activity states */
+.idle {
+    background-color: #F3F3F3;
+}
+
+/* LastBuild, BuildStep states */
+.success {
+    background-color: #72ff75;
+}
+.failure {
+    background-color: red;
+}
+.warnings {
+    background-color: orange;
+}
+.exception {
+    background-color: #c000c0;
+}
+.start,.running {
+    background-color: yellow;
+}
+
+/* color trunk/branch builder links differently */
+
+.Builder a[href*="trunk"] {
+    color: #05e;
+}
new file mode 100644
--- /dev/null
+++ b/mozilla2/win32/mozconfig
@@ -0,0 +1,1 @@
+ac_add_options --enable-application=browser