[146939] contrib/buildbot-test/master.cfg
mojca at macports.org
mojca at macports.org
Mon Mar 21 02:15:18 PDT 2016
Revision: 146939
https://trac.macports.org/changeset/146939
Author: mojca at macports.org
Date: 2016-03-21 02:15:18 -0700 (Mon, 21 Mar 2016)
Log Message:
-----------
buildbot-test: replace tabs with spaces, other whitespace changes
Modified Paths:
--------------
contrib/buildbot-test/master.cfg
Modified: contrib/buildbot-test/master.cfg
===================================================================
--- contrib/buildbot-test/master.cfg 2016-03-21 05:47:35 UTC (rev 146938)
+++ contrib/buildbot-test/master.cfg 2016-03-21 09:15:18 UTC (rev 146939)
@@ -1,4 +1,4 @@
-# -*- python -*-
+####### -*- python -*-
# ex: set syntax=python:
# vim:ft=python
@@ -112,7 +112,7 @@
if f.startswith('base'):
return True
return False
-
+
from buildbot.changes.filter import ChangeFilter
portsfilter = ChangeFilter(filter_fn=change_has_ports)
basefilter = ChangeFilter(filter_fn=change_has_base)
@@ -127,43 +127,43 @@
from buildbot.schedulers.forcesched import StringParameter
from buildbot.schedulers.triggerable import Triggerable
-c['schedulers'] = [SingleBranchScheduler(
- name="base",
- treeStableTimer=None,
- change_filter = basefilter,
- builderNames=base_buildernames),
- SingleBranchScheduler(
- name="ports",
- treeStableTimer=None,
- change_filter = portsfilter,
- builderNames=portwatcher_buildernames),
- ForceScheduler(
- name="base_force",
- builderNames=base_buildernames),
- ForceScheduler(
- name="portbuilder_force",
- builderNames=portbuilder_buildernames,
- properties=[
- StringParameter(
- name="portname",
- label="Port name:",
- default="")
- ]),
- ForceScheduler(
- name="portwatcher_force",
- builderNames=portwatcher_buildernames,
- properties=[
- StringParameter(
- name="portlist",
- label="Port list:",
- default="",
- size=30)
- ])
- ]
+c['schedulers'] = [
+ SingleBranchScheduler(
+ name="base",
+ treeStableTimer=None,
+ change_filter = basefilter,
+ builderNames=base_buildernames),
+ SingleBranchScheduler(
+ name="ports",
+ treeStableTimer=None,
+ change_filter = portsfilter,
+ builderNames=portwatcher_buildernames),
+ ForceScheduler(
+ name="base_force",
+ builderNames=base_buildernames),
+ ForceScheduler(
+ name="portbuilder_force",
+ builderNames=portbuilder_buildernames,
+ properties=[StringParameter(
+ name="portname",
+ label="Port name:",
+ default="")
+ ]),
+ ForceScheduler(
+ name="portwatcher_force",
+ builderNames=portwatcher_buildernames,
+ properties=[StringParameter(
+ name="portlist",
+ label="Port list:",
+ default="",
+ size=30)
+ ])
+ ]
for i in range(len(portbuilder_buildernames)):
- c['schedulers'].append(Triggerable(name=portbuilder_triggerables[i],
- builderNames=[portbuilder_buildernames[i]]))
+ c['schedulers'].append(Triggerable(
+ name=portbuilder_triggerables[i],
+ builderNames=[portbuilder_buildernames[i]]))
####### BUILDERS
@@ -180,9 +180,11 @@
from buildbot.steps.shell import ShellCommand, Compile, Configure, SetPropertyFromCommand
base_factory = BuildFactory()
-base_factory.addStep(SVN(repourl='https://svn.macports.org/repository/macports/trunk/base',
-#base_factory.addStep(SVN(repourl=Interpolate('https://svn.macports.org/repository/macports/%(src::branch:-trunk)s/base'),
- method="copy"))
+#base_factory.addStep(SVN(
+# repourl=Interpolate('https://svn.macports.org/repository/macports/%(src::branch:-trunk)s/base'),
+base_factory.addStep(SVN(
+ repourl='https://svn.macports.org/repository/macports/trunk/base',
+ method="copy"))
base_factory.addStep(Configure(command=WithProperties("""
env PATH=/usr/bin:/bin:/usr/sbin:/sbin ./configure --enable-readline \
--prefix=%(workdir)s/opt/local \
@@ -191,34 +193,42 @@
--with-install-group=`id -gn` \
"""),logfiles={"config.log": "config.log"}))
base_factory.addStep(Compile(command="make -j`sysctl -n hw.activecpu`"))
-base_factory.addStep(ShellCommand(command="make install", name="install", description="install"))
-base_factory.addStep(ShellCommand(command="make test", name="test", description="test"))
-base_factory.addStep(ShellCommand(command=WithProperties("make distclean; rm -rf %(workdir)s/opt/local"),
- name="clean", description="clean"))
+base_factory.addStep(ShellCommand(
+ command="make install",
+ name="install",
+ description="install"))
+base_factory.addStep(ShellCommand(
+ command="make test",
+ name="test",
+ description="test"))
+base_factory.addStep(ShellCommand(
+ command=WithProperties("make distclean; rm -rf %(workdir)s/opt/local"),
+ name="clean",
+ description="clean"))
# custom class to make the file list available on the slave...
class SetPropertyFromCommandWithPortlist(SetPropertyFromCommand):
- name = 'generate portlist'
- description = 'generate portlist'
+ name = 'generate portlist'
+ description = 'generate portlist'
- def setBuild(self, build):
- SetPropertyFromCommand.setBuild(self, build)
-
- portset = set()
- # support forced build properties
- if self.getProperty('portlist'):
- for v in self.getProperty('portlist').strip().split():
- portset.add(v)
+ def setBuild(self, build):
+ SetPropertyFromCommand.setBuild(self, build)
- # paths should be dports/category/portdir(/...)
- for f in self.build.allFiles():
- comps = f.split('/')
- if len(comps) >= 3 and comps[0] == 'dports' and comps[1] != '_resources':
- portset.add(comps[2])
+ portset = set()
+ # support forced build properties
+ if self.getProperty('portlist'):
+ for v in self.getProperty('portlist').strip().split():
+ portset.add(v)
- self.setProperty('fullportlist', ' '.join(portset))
+ # paths should be dports/category/portdir(/...)
+ for f in self.build.allFiles():
+ comps = f.split('/')
+ if len(comps) >= 3 and comps[0] == 'dports' and comps[1] != '_resources':
+ portset.add(comps[2])
+ self.setProperty('fullportlist', ' '.join(portset))
+
# can't run with prefix inside the workdir in production,
# because archives must be built with prefix=/opt/local
if production:
@@ -227,9 +237,8 @@
dlpath='/var/www/html/packages'
else:
prefix=slaveprefix
-
+ dlhost=''
dlpath='./deployed_archives'
- dlhost=''
ulpath='archive_staging'
ulpath_unique=ulpath+'-%(buildername)s'
@@ -248,66 +257,100 @@
for port in self.build.getProperty("subportlist").split():
sp.append([scheduler,{"portname": port}])
return sp
-
+
# -- Port Watcher --
def make_portwatcher_factory(triggerable):
- portwatcher_factory = BuildFactory()
- # get mp-buildbot; we'll do the checkout of base and dports via these scripts
- portwatcher_factory.addStep(SVN(repourl=mpbbsvnurl,alwaysUseLatest=True,preferLastChangedRev=True,mode="incremental",workdir="build/mpbb",haltOnFailure=True))
+ portwatcher_factory = BuildFactory()
+ # get mp-buildbot; we'll do the checkout of base and dports via these scripts
+ portwatcher_factory.addStep(SVN(
+ repourl=mpbbsvnurl,
+ alwaysUseLatest=True,
+ preferLastChangedRev=True,
+ mode="incremental",
+ workdir="build/mpbb",
+ haltOnFailure=True))
- portwatcher_factory.addStep(SetPropertyFromCommandWithPortlist(command=WithProperties('for portname in %(fullportlist)s; do for subport in `./mpbb/tools/subports.tcl $portname`; do echo $subport; done; done' ),
- property="subportlist",
- name="subports", description="subports"))
+ portwatcher_factory.addStep(SetPropertyFromCommandWithPortlist(
+ command=WithProperties('for portname in %(fullportlist)s; do for subport in `./mpbb/tools/subports.tcl $portname`; do echo $subport; done; done' ),
+ property="subportlist",
+ name="subports",
+ description="subports"))
- portwatcher_factory.addStep(TriggerWithPortlist(schedulerNames=[triggerable],
- waitForFinish=True,
- updateSourceStamp=True))
+ portwatcher_factory.addStep(TriggerWithPortlist(
+ schedulerNames=[triggerable],
+ waitForFinish=True,
+ updateSourceStamp=True))
- # make a logfile summarising the success/failure status for each port
- #portwatcher_factory.addStep(ShellCommand(command=["./do_status.sh"],
- # name="status",
- # description="status",
- # env={'PREFIX': WithProperties(prefix)
- # },
- # logfiles={"portstatus": "portstatus.log"}))
+ # make a logfile summarising the success/failure status for each port
+ #portwatcher_factory.addStep(ShellCommand(command=["./do_status.sh"],
+ # name="status",
+ # description="status",
+ # env={'PREFIX': WithProperties(prefix)
+ # },
+ # logfiles={"portstatus": "portstatus.log"}))
- return portwatcher_factory
+ return portwatcher_factory
from buildbot.process.buildstep import BuildStep
class InfoStep(BuildStep):
- def __init__(self, title='', **kwargs):
- BuildStep.__init__(self,**kwargs)
- self.name = title
- self.description = title
- self.descriptionDone = title
- self.doStepIf = False
+ def __init__(self, title='', **kwargs):
+ BuildStep.__init__(self, **kwargs)
+ self.name = title
+ self.description = title
+ self.descriptionDone = title
+ self.doStepIf = False
# -- Port Builder --
portbuilder_factory = BuildFactory()
# XXX: use InfoStep instead of running a dummy command
-portbuilder_factory.addStep(ShellCommand(command=["/usr/bin/true"],description=[WithProperties("Port %(portname)s")]))
+portbuilder_factory.addStep(ShellCommand(
+ command=["/usr/bin/true"],
+ description=[WithProperties("Port %(portname)s")]))
#portbuilder_factory.addStep(InfoStep(title=WithProperties("Port %(portname)s")))
-portbuilder_factory.addStep(SVN(repourl=mpbbsvnurl,alwaysUseLatest=True,preferLastChangedRev=True,mode="incremental",workdir="build/mpbb",haltOnFailure=True))
-portbuilder_factory.addStep(ShellCommand(command=['./mpbb/mpbb', 'selfupdate', '--prefix', WithProperties(prefix)],haltOnFailure=True,
- name="selfupdate", description="selfupdate"))
-portbuilder_factory.addStep(ShellCommand(command=['./mpbb/mpbb', 'checkout', '--prefix', WithProperties(prefix), '--svn-url', svnurl],
- timeout=3600,haltOnFailure=True,
- name="checkout", description="checkout"))
-portbuilder_factory.addStep(ShellCommand(command=['./mpbb/mpbb', 'install-dependencies', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s')],haltOnFailure=True,
- name="install-dependencies", description="install-dependencies"))
-portbuilder_factory.addStep(ShellCommand(command=['./mpbb/mpbb', 'install-port', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s')],haltOnFailure=True,
- name="install-port", description="install-port"))
-portbuilder_factory.addStep(ShellCommand(command=['./mpbb/mpbb', 'gather-archives', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s'), '--archive-site', archivesite, '--staging-dir', ulpath],haltOnFailure=True,
- name="gather-archives", description="gather-archives"))
+portbuilder_factory.addStep(SVN(
+ repourl=mpbbsvnurl,
+ alwaysUseLatest=True,
+ preferLastChangedRev=True,
+ mode="incremental",
+ workdir="build/mpbb",
+ haltOnFailure=True))
+portbuilder_factory.addStep(ShellCommand(
+ command=['./mpbb/mpbb', 'selfupdate', '--prefix', WithProperties(prefix)],
+ name="selfupdate",
+ description="selfupdate",
+ haltOnFailure=True))
+portbuilder_factory.addStep(ShellCommand(
+ command=['./mpbb/mpbb', 'checkout', '--prefix', WithProperties(prefix), '--svn-url', svnurl],
+ timeout=3600,
+ name="checkout",
+ description="checkout",
+ haltOnFailure=True))
+portbuilder_factory.addStep(ShellCommand(
+ command=['./mpbb/mpbb', 'install-dependencies', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s')],
+ name="install-dependencies",
+ description="install-dependencies",
+ haltOnFailure=True))
+portbuilder_factory.addStep(ShellCommand(
+ command=['./mpbb/mpbb', 'install-port', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s')],
+ name="install-port",
+ description="install-port",
+ haltOnFailure=True))
+portbuilder_factory.addStep(ShellCommand(
+ command=['./mpbb/mpbb', 'gather-archives', '--prefix', WithProperties(prefix), '--port', WithProperties('%(portname)s'), '--archive-site', archivesite, '--staging-dir', ulpath],
+ name="gather-archives",
+ description="gather-archives",
+ haltOnFailure=True))
# upload archives from build slave to master
-portbuilder_factory.addStep(DirectoryUpload(slavesrc=ulpath, masterdest=WithProperties(ulpath_unique)))
+portbuilder_factory.addStep(DirectoryUpload(
+ slavesrc=ulpath,
+ masterdest=WithProperties(ulpath_unique)))
# XXX: move deploy_archives.sh functionality to mp-buildbot
# sign generated binaries and sync to download server (if distributable)
@@ -336,7 +379,7 @@
if production:
slavenames = slavedata.keys()
for plat in build_platforms:
- baseslaves[plat] = filter(lambda x: x.endswith(plat+"-base"), slavenames)
+ baseslaves[plat] = filter(lambda x: x.endswith(plat+"-base"), slavenames)
portsslaves[plat] = filter(lambda x: x.endswith(plat+"-ports"), slavenames)
#else:
#slavenames = ["snowleopard-x86_64"]
@@ -350,8 +393,8 @@
name="base-" + plat,
slavenames=["base-" + plat],
factory=base_factory,
- env={"PATH": "/usr/bin:/bin:/usr/sbin:/sbin"})]
- if 'linux' not in plat:
+ env={"PATH": "/usr/bin:/bin:/usr/sbin:/sbin"})]
+ if 'linux' not in plat:
c['builders'] += [
BuilderConfig(
name="portwatcher-" + plat,
@@ -382,21 +425,25 @@
htauth = HTPasswdAuth(htpasswdfile)
authz_cfg=authz.Authz(
- auth=htauth,
- gracefulShutdown = 'auth',
- forceBuild = 'auth',
- forceAllBuilds = 'auth',
- pingBuilder = 'auth',
- stopBuild = 'auth',
- stopAllBuilds = 'auth',
+ auth = htauth,
+ gracefulShutdown = 'auth',
+ forceBuild = 'auth',
+ forceAllBuilds = 'auth',
+ pingBuilder = 'auth',
+ stopBuild = 'auth',
+ stopAllBuilds = 'auth',
cancelPendingBuild = 'auth',
)
if production:
# send mail about base failures to users on the blamelist
from buildbot.status.mail import MailNotifier
- mn = MailNotifier(fromaddr="noreply at macports.org", lookup="", relayhost="localhost",
- builders=base_buildernames, mode="problem")
+ mn = MailNotifier(
+ fromaddr="noreply at macports.org",
+ lookup="",
+ relayhost="localhost",
+ builders=base_buildernames,
+ mode="problem")
c['status'].append(mn)
import subprocess
@@ -459,10 +506,10 @@
c['buildbotURL'] = buildboturl
c['status'].append(html.WebStatus(
- http_port=httpport,
- authz=authz_cfg,
- changecommentlink=(r"#(\d+)", r"https://trac.macports.org/ticket/\1", r"Ticket \g<0>")
- ))
+ http_port=httpport,
+ authz=authz_cfg,
+ changecommentlink=(r"#(\d+)", r"https://trac.macports.org/ticket/\1", r"Ticket \g<0>")
+))
c['revlink'] = util.RevlinkMatch([r'https://svn.macports.org/repository/macports/(.*)'],
r'https://trac.macports.org/changeset/%s')
@@ -478,8 +525,7 @@
######## Cache settings
-c['buildHorizon'] = 10000
-c['logHorizon'] = 5000
-c['eventHorizon'] = 2000
-c['buildCacheSize'] = 600
-
+c['buildHorizon'] = 10000
+c['logHorizon'] = 5000
+c['eventHorizon'] = 2000
+c['buildCacheSize'] = 600
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160321/3f84782a/attachment-0001.html>
More information about the macports-changes
mailing list