[80188]

wsiegrist at apple.com wsiegrist at apple.com
Wed Jul 6 08:17:31 PDT 2011


Revision: 80188
          http://trac.macports.org/changeset/80188
Author:   wsiegrist at apple.com
Date:     2011-07-06 08:17:31 -0700 (Wed, 06 Jul 2011)
Log Message:
-----------
Move buildbot config to contrib

Added Paths:
-----------
    contrib/buildbot/master.cfg

Removed Paths:
-------------
    users/jmr/master.cfg

Copied: contrib/buildbot/master.cfg (from rev 80187, users/jmr/master.cfg)
===================================================================
--- contrib/buildbot/master.cfg	                        (rev 0)
+++ contrib/buildbot/master.cfg	2011-07-06 15:17:31 UTC (rev 80188)
@@ -0,0 +1,222 @@
+# -*- python -*-
+# ex: set syntax=python:
+
+# This is a buildmaster config file. It must be installed as
+# 'master.cfg' in your buildmaster's base directory.
+
+# This is the dictionary that the buildmaster pays attention to. We also use
+# a shorter alias to save typing.
+c = BuildmasterConfig = {}
+
+# Master variable to toggle config between testing on your personal system
+# (where /opt/local shouldn't be messed with) and the production server (where
+# it has to be)
+production = False
+
+####### BUILDSLAVES
+
+# The 'slaves' list defines the set of recognized buildslaves. Each element is
+# a BuildSlave object, specifying a unique slave name and password.  The same
+# slave name and password must be configured on the slave.
+from buildbot.buildslave import BuildSlave
+if production:
+    # FIXME
+    c['slaves'] = []
+else:
+    c['slaves'] = [BuildSlave("snowleopard-x86_64", "pass")]
+
+# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
+# This must match the value configured into the buildslaves (with their
+# --master option)
+c['slavePortnum'] = 9989
+
+####### CHANGESOURCES
+
+# the 'change_source' setting tells the buildmaster how it should find out
+# about source code changes.
+
+# poller is used for local testing but PBChangeSource (which relies on
+# notifications from a post-commit script) should be used in production
+
+if production:
+    from buildbot.changes.pb import PBChangeSource
+    # FIXME: real username and password
+    c['change_source'] = PBChangeSource(user='change', passwd='changepw')
+else:
+    from buildbot.changes.svnpoller import SVNPoller
+    c['change_source'] = [SVNPoller(
+            'https://svn.macports.org/repository/macports/trunk/base',
+            project='base',
+            svnbin='/opt/local/bin/svn',
+            pollinterval=300),
+        SVNPoller(
+            'https://svn.macports.org/repository/macports/trunk/dports',
+            project='ports',
+            svnbin='/opt/local/bin/svn',
+            pollinterval=300)
+        ]
+
+####### SCHEDULERS
+
+# consider changes to _resources as unimportant
+def ports_check_importance(change):
+    for f in change.files:
+        if f.split('/')[0] != "_resources":
+            return True
+    return False
+
+# Configure the Schedulers, which decide how to react to incoming changes.
+
+from buildbot.changes.filter import ChangeFilter
+base_filter = ChangeFilter(project="base")
+ports_filter = ChangeFilter(project="ports")
+
+from buildbot.schedulers.basic import SingleBranchScheduler
+c['schedulers'] = [SingleBranchScheduler(
+                            name="base",
+                            treeStableTimer=300,
+                            change_filter=base_filter,
+                            builderNames=["buildbase"]),
+                   SingleBranchScheduler(
+                            name="ports",
+                            treeStableTimer=30,
+                            change_filter=ports_filter,
+                            fileIsImportant=ports_check_importance,
+                            builderNames=["buildports"])
+                ]
+
+####### BUILDERS
+
+#c['mergeRequests'] = True
+
+# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
+# what steps, and which slaves can execute them.  Note that any particular build will
+# only take place on one slave.
+
+from buildbot.process.factory import BuildFactory, GNUAutoconf
+from buildbot.process.properties import WithProperties
+from buildbot.steps.source import SVN
+from buildbot.steps.shell import ShellCommand, Compile
+
+base_factory = GNUAutoconf(source=SVN(svnurl='https://svn.macports.org/repository/macports/trunk/base', mode="copy"),
+                             configureFlags=["--enable-readline"],
+                             compile=["make", "-j2"],
+                             test=["make", "test"])
+
+
+# custom class to make the file list available on the slave...
+class ShellCommandWithPortList(ShellCommand):
+         def setBuild(self, build):
+            ShellCommand.setBuild(self, build)
+            
+            portset = set()
+            # paths should be category/portdir(/...)
+            for f in self.build.allFiles():
+                comps = f.split('/')
+                if len(comps) >= 2 and comps[0] != '_resources':
+                    portset.add(comps[1])
+            portlist = ' '.join(portset)
+            self.setProperty('portlist', portlist)
+
+
+# can't run with PREFIX/SRC_PREFIX inside the workdir in production,
+# because archives must be built with prefix=/opt/local
+if production:
+    prefix='/opt/local'
+    src_prefix='/opt/mports'
+    # FIXME
+    dlhost='mparchives.local'
+    dlpath='/archives'
+else:
+    prefix='%(workdir)s/opt/local'
+    src_prefix='%(workdir)s/opt/mports'
+    dlhost=''
+    dlpath='.'
+
+ports_factory = BuildFactory()
+# get MPAB itself; we'll do the checkout of base and dports via MPAB's script
+ports_factory.addStep(SVN(svnurl='https://svn.macports.org/repository/macports/contrib/mpab',
+                      mode="update"))
+ports_factory.addStep(ShellCommand(command=["./mpsync.sh"],
+                      env={'PREFIX': WithProperties(prefix),
+                           'SRC_PREFIX': WithProperties(src_prefix)}))
+ports_factory.addStep(ShellCommandWithPortList(command=WithProperties('echo %(portlist)s | tr " " "\n" > portlist')))
+# run MPAB on the port list
+ports_factory.addStep(Compile(command=["./mpab", "buildports", "portlist"],
+                      env={'PREFIX': WithProperties(prefix),
+                           'SRC_PREFIX': WithProperties(src_prefix)}))
+# sign generated binaries and sync to download server (if distributable)
+ports_factory.addStep(ShellCommand(command=["./deploy_archives.sh"],
+                      env={'PREFIX': WithProperties(prefix),
+                           'DLHOST': dlhost,
+                           'DLPATH': dlpath}))
+
+# make a logfile summarising the success/failure status for each port
+ports_factory.addStep(ShellCommand(command=["./do_status.sh"],
+                        env={'PREFIX': WithProperties(prefix)},
+                        logfiles={"portstatus": "portstatus.log"}))
+# do we want to upload the individual logs so maintainers can review them?
+ports_factory.addStep(ShellCommand(command="rm -rf ./logs-*"))
+
+from buildbot.config import BuilderConfig
+
+if production:
+    # FIXME
+    c['builders']= []
+else:
+    c['builders']= [
+        BuilderConfig(name="buildbase",
+          slavenames=["snowleopard-x86_64"],
+          factory=base_factory),
+        BuilderConfig(name="buildports",
+          slavenames=["snowleopard-x86_64"],
+          factory=ports_factory)
+        ]
+
+####### STATUS TARGETS
+
+# 'status' is a list of Status Targets. The results of each build will be
+# pushed to these targets. buildbot/status/*.py has a variety to choose from,
+# including web pages, email senders, and IRC bots.
+
+c['status'] = []
+
+from buildbot.status import html
+from buildbot.status.web import auth, authz
+authz_cfg=authz.Authz(
+    # change any of these to True to enable; see the manual for more
+    # options
+    gracefulShutdown = False,
+    forceBuild = True, # use this to test your slave once it is set up
+    forceAllBuilds = False,
+    pingBuilder = False,
+    stopBuild = False,
+    stopAllBuilds = False,
+    cancelPendingBuild = False,
+)
+c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
+
+####### PROJECT IDENTITY
+
+# the 'title' string will appear at the top of this buildbot
+# installation's html.WebStatus home page (linked to the
+# 'titleURL') and is embedded in the title of the waterfall HTML page.
+
+c['title'] = "MacPorts"
+c['titleURL'] = "http://www.macports.org/"
+
+# the 'buildbotURL' string should point to the location where the buildbot's
+# internal web server (usually the html.WebStatus 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://localhost:8010/"
+
+####### DB URL
+
+# This specifies what database buildbot uses to store change and scheduler
+# state.  You can leave this at its default for all but the largest
+# installations.
+c['db_url'] = "sqlite:///state.sqlite"
+

Deleted: users/jmr/master.cfg
===================================================================
--- users/jmr/master.cfg	2011-07-06 15:16:16 UTC (rev 80187)
+++ users/jmr/master.cfg	2011-07-06 15:17:31 UTC (rev 80188)
@@ -1,222 +0,0 @@
-# -*- python -*-
-# ex: set syntax=python:
-
-# This is a buildmaster config file. It must be installed as
-# 'master.cfg' in your buildmaster's base directory.
-
-# This is the dictionary that the buildmaster pays attention to. We also use
-# a shorter alias to save typing.
-c = BuildmasterConfig = {}
-
-# Master variable to toggle config between testing on your personal system
-# (where /opt/local shouldn't be messed with) and the production server (where
-# it has to be)
-production = False
-
-####### BUILDSLAVES
-
-# The 'slaves' list defines the set of recognized buildslaves. Each element is
-# a BuildSlave object, specifying a unique slave name and password.  The same
-# slave name and password must be configured on the slave.
-from buildbot.buildslave import BuildSlave
-if production:
-    # FIXME
-    c['slaves'] = []
-else:
-    c['slaves'] = [BuildSlave("snowleopard-x86_64", "pass")]
-
-# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
-# This must match the value configured into the buildslaves (with their
-# --master option)
-c['slavePortnum'] = 9989
-
-####### CHANGESOURCES
-
-# the 'change_source' setting tells the buildmaster how it should find out
-# about source code changes.
-
-# poller is used for local testing but PBChangeSource (which relies on
-# notifications from a post-commit script) should be used in production
-
-if production:
-    from buildbot.changes.pb import PBChangeSource
-    # FIXME: real username and password
-    c['change_source'] = PBChangeSource(user='change', passwd='changepw')
-else:
-    from buildbot.changes.svnpoller import SVNPoller
-    c['change_source'] = [SVNPoller(
-            'https://svn.macports.org/repository/macports/trunk/base',
-            project='base',
-            svnbin='/opt/local/bin/svn',
-            pollinterval=300),
-        SVNPoller(
-            'https://svn.macports.org/repository/macports/trunk/dports',
-            project='ports',
-            svnbin='/opt/local/bin/svn',
-            pollinterval=300)
-        ]
-
-####### SCHEDULERS
-
-# consider changes to _resources as unimportant
-def ports_check_importance(change):
-    for f in change.files:
-        if f.split('/')[0] != "_resources":
-            return True
-    return False
-
-# Configure the Schedulers, which decide how to react to incoming changes.
-
-from buildbot.changes.filter import ChangeFilter
-base_filter = ChangeFilter(project="base")
-ports_filter = ChangeFilter(project="ports")
-
-from buildbot.schedulers.basic import SingleBranchScheduler
-c['schedulers'] = [SingleBranchScheduler(
-                            name="base",
-                            treeStableTimer=300,
-                            change_filter=base_filter,
-                            builderNames=["buildbase"]),
-                   SingleBranchScheduler(
-                            name="ports",
-                            treeStableTimer=30,
-                            change_filter=ports_filter,
-                            fileIsImportant=ports_check_importance,
-                            builderNames=["buildports"])
-                ]
-
-####### BUILDERS
-
-#c['mergeRequests'] = True
-
-# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
-# what steps, and which slaves can execute them.  Note that any particular build will
-# only take place on one slave.
-
-from buildbot.process.factory import BuildFactory, GNUAutoconf
-from buildbot.process.properties import WithProperties
-from buildbot.steps.source import SVN
-from buildbot.steps.shell import ShellCommand, Compile
-
-base_factory = GNUAutoconf(source=SVN(svnurl='https://svn.macports.org/repository/macports/trunk/base', mode="copy"),
-                             configureFlags=["--enable-readline"],
-                             compile=["make", "-j2"],
-                             test=["make", "test"])
-
-
-# custom class to make the file list available on the slave...
-class ShellCommandWithPortList(ShellCommand):
-         def setBuild(self, build):
-            ShellCommand.setBuild(self, build)
-            
-            portset = set()
-            # paths should be category/portdir(/...)
-            for f in self.build.allFiles():
-                comps = f.split('/')
-                if len(comps) >= 2 and comps[0] != '_resources':
-                    portset.add(comps[1])
-            portlist = ' '.join(portset)
-            self.setProperty('portlist', portlist)
-
-
-# can't run with PREFIX/SRC_PREFIX inside the workdir in production,
-# because archives must be built with prefix=/opt/local
-if production:
-    prefix='/opt/local'
-    src_prefix='/opt/mports'
-    # FIXME
-    dlhost='mparchives.local'
-    dlpath='/archives'
-else:
-    prefix='%(workdir)s/opt/local'
-    src_prefix='%(workdir)s/opt/mports'
-    dlhost=''
-    dlpath='.'
-
-ports_factory = BuildFactory()
-# get MPAB itself; we'll do the checkout of base and dports via MPAB's script
-ports_factory.addStep(SVN(svnurl='https://svn.macports.org/repository/macports/contrib/mpab',
-                      mode="update"))
-ports_factory.addStep(ShellCommand(command=["./mpsync.sh"],
-                      env={'PREFIX': WithProperties(prefix),
-                           'SRC_PREFIX': WithProperties(src_prefix)}))
-ports_factory.addStep(ShellCommandWithPortList(command=WithProperties('echo %(portlist)s | tr " " "\n" > portlist')))
-# run MPAB on the port list
-ports_factory.addStep(Compile(command=["./mpab", "buildports", "portlist"],
-                      env={'PREFIX': WithProperties(prefix),
-                           'SRC_PREFIX': WithProperties(src_prefix)}))
-# sign generated binaries and sync to download server (if distributable)
-ports_factory.addStep(ShellCommand(command=["./deploy_archives.sh"],
-                      env={'PREFIX': WithProperties(prefix),
-                           'DLHOST': dlhost,
-                           'DLPATH': dlpath}))
-
-# make a logfile summarising the success/failure status for each port
-ports_factory.addStep(ShellCommand(command=["./do_status.sh"],
-                        env={'PREFIX': WithProperties(prefix)},
-                        logfiles={"portstatus": "portstatus.log"}))
-# do we want to upload the individual logs so maintainers can review them?
-ports_factory.addStep(ShellCommand(command="rm -rf ./logs-*"))
-
-from buildbot.config import BuilderConfig
-
-if production:
-    # FIXME
-    c['builders']= []
-else:
-    c['builders']= [
-        BuilderConfig(name="buildbase",
-          slavenames=["snowleopard-x86_64"],
-          factory=base_factory),
-        BuilderConfig(name="buildports",
-          slavenames=["snowleopard-x86_64"],
-          factory=ports_factory)
-        ]
-
-####### STATUS TARGETS
-
-# 'status' is a list of Status Targets. The results of each build will be
-# pushed to these targets. buildbot/status/*.py has a variety to choose from,
-# including web pages, email senders, and IRC bots.
-
-c['status'] = []
-
-from buildbot.status import html
-from buildbot.status.web import auth, authz
-authz_cfg=authz.Authz(
-    # change any of these to True to enable; see the manual for more
-    # options
-    gracefulShutdown = False,
-    forceBuild = True, # use this to test your slave once it is set up
-    forceAllBuilds = False,
-    pingBuilder = False,
-    stopBuild = False,
-    stopAllBuilds = False,
-    cancelPendingBuild = False,
-)
-c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
-
-####### PROJECT IDENTITY
-
-# the 'title' string will appear at the top of this buildbot
-# installation's html.WebStatus home page (linked to the
-# 'titleURL') and is embedded in the title of the waterfall HTML page.
-
-c['title'] = "MacPorts"
-c['titleURL'] = "http://www.macports.org/"
-
-# the 'buildbotURL' string should point to the location where the buildbot's
-# internal web server (usually the html.WebStatus 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://localhost:8010/"
-
-####### DB URL
-
-# This specifies what database buildbot uses to store change and scheduler
-# state.  You can leave this at its default for all but the largest
-# installations.
-c['db_url'] = "sqlite:///state.sqlite"
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110706/5f9200ca/attachment.html>


More information about the macports-changes mailing list