[81184] contrib/buildbot/master.cfg

wsiegrist at apple.com wsiegrist at apple.com
Tue Jul 26 17:36:17 PDT 2011


Revision: 81184
          http://trac.macports.org/changeset/81184
Author:   wsiegrist at apple.com
Date:     2011-07-26 17:36:16 -0700 (Tue, 26 Jul 2011)
Log Message:
-----------
Support for changes being sent from svn server plus move buildbot behind the proxy

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

Modified: contrib/buildbot/master.cfg
===================================================================
--- contrib/buildbot/master.cfg	2011-07-26 22:06:39 UTC (rev 81183)
+++ contrib/buildbot/master.cfg	2011-07-27 00:36:16 UTC (rev 81184)
@@ -67,43 +67,44 @@
 else:
     from buildbot.changes.svnpoller import SVNPoller
     c['change_source'] = [SVNPoller(
-            'https://svn.macports.org/repository/macports/trunk/base',
-            project='base',
+            'https://svn.macports.org/repository/macports/trunk',
             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):
+def change_has_ports(change):
     for f in change.files:
-        if f.split('/')[0] != "_resources":
+        if "_resources" in f:
+            continue
+        if "dports" in f and "Portfile" in f:
             return True
     return False
 
+def change_has_base(change):
+    for f in change.files:
+        if f.startswith('base'):
+            return True
+    return False
+        
+
 # Configure the Schedulers, which decide how to react to incoming changes.
-
+from buildbot.schedulers.basic import SingleBranchScheduler
 from buildbot.changes.filter import ChangeFilter
-base_filter = ChangeFilter(project="base")
-ports_filter = ChangeFilter(project="ports")
-
-from buildbot.schedulers.basic import SingleBranchScheduler
+repofilter = ChangeFilter(repository="/svn/repositories/macports")
 c['schedulers'] = [SingleBranchScheduler(
                             name="base",
-                            treeStableTimer=300,
-                            change_filter=base_filter,
+                            treeStableTimer=10,
+                            fileIsImportant=change_has_base,
+                            change_filter = repofilter,
                             builderNames=["buildbase"]),
                    SingleBranchScheduler(
                             name="ports",
-                            treeStableTimer=30,
-                            change_filter=ports_filter,
-                            fileIsImportant=ports_check_importance,
+                            treeStableTimer=10,
+                            fileIsImportant=change_has_ports,
+                            change_filter = repofilter,
                             builderNames=["buildports"])
                 ]
 
@@ -141,10 +142,10 @@
                 portlist = ''
 
             portset = set()
-            # paths should be category/portdir(/...)
+            # paths should be dports/category/portdir(/...)
             for f in self.build.allFiles():
                 comps = f.split('/')
-                if len(comps) >= 2 and comps[0] != '_resources':
+                if len(comps) >= 3 and comps[0] == 'dports':
                     portset.add(comps[1])
             portlist += ' ' + ' '.join(portset)
             self.setProperty('portlist', portlist)
@@ -157,12 +158,15 @@
     src_prefix='/opt/mports'
     dlhost=''
     dlpath='/www/hosts/packages.macports.org'
+    ulpath='archive_staging'
 else:
     prefix='%(workdir)s/opt/local'
     src_prefix='%(workdir)s/opt/mports'
     dlhost=''
     dlpath='./deployed_archives'
+    ulpath='archive_staging'
 
+
 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',
@@ -179,11 +183,11 @@
                       env={'PREFIX': WithProperties(prefix),
                            'SRC_PREFIX': WithProperties(src_prefix)}))
 
-ulpath='archive_staging'
 ports_factory.addStep(ShellCommand(command=["./gather_archives.sh"],
                                    name="gather archives",
                                    description="gather distributable archives",
                       env={'PREFIX': WithProperties(prefix),
+			   'HOME': '/tmp/',
                            'ULPATH': ulpath}))
 # upload archives from build slave to master
 from buildbot.steps.transfer import DirectoryUpload
@@ -202,7 +206,9 @@
 ports_factory.addStep(ShellCommand(command=["./do_status.sh"],
                                    name="status",
                                    description="status",
-                        env={'PREFIX': WithProperties(prefix)},
+                        env={'PREFIX': WithProperties(prefix),
+                             'HOME': '/tmp/',
+                             },
                         logfiles={"portstatus": "portstatus.log"}))
 # TODO: do we want to upload the individual logs so maintainers can review them?
 ports_factory.addStep(ShellCommand(command="rm -rf ./logs-* ./"+ulpath,
@@ -262,7 +268,7 @@
 
 if production:
     c['buildbotURL'] = "http://build.macports.org/"
-    c['status'].append(html.WebStatus(http_port=80, authz=authz_cfg))
+    c['status'].append(html.WebStatus(http_port=8710, authz=authz_cfg))
 else:
     c['buildbotURL'] = "http://localhost:8010/"
     c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110726/503ffb20/attachment.html>


More information about the macports-changes mailing list