[147071] contrib/buildbot-test/master.cfg
raimue at macports.org
raimue at macports.org
Fri Mar 25 09:20:04 PDT 2016
Revision: 147071
https://trac.macports.org/changeset/147071
Author: raimue at macports.org
Date: 2016-03-25 09:20:04 -0700 (Fri, 25 Mar 2016)
Log Message:
-----------
Add custom triggered_by property for backlinks
The triggered_by property on a portbuilder build will link back to the
portwatcher build that triggered it.
Modified Paths:
--------------
contrib/buildbot-test/master.cfg
Modified: contrib/buildbot-test/master.cfg
===================================================================
--- contrib/buildbot-test/master.cfg 2016-03-25 16:16:33 UTC (rev 147070)
+++ contrib/buildbot-test/master.cfg 2016-03-25 16:20:04 UTC (rev 147071)
@@ -247,6 +247,18 @@
from buildbot.steps.master import MasterShellCommand
from buildbot.steps.trigger import Trigger
+from buildbot.process.properties import renderer
+
+ at renderer
+def make_triggeredby_url(props):
+ buildername = props.getProperty('buildername')
+ buildnumber = props.getProperty('buildnumber')
+ url = c['buildbotURL']
+ if not url.endswith('/'):
+ url += '/'
+ url += "builders/%s/builds/%s" % (buildername, buildnumber)
+ return url
+
class TriggerWithPortlist(Trigger):
def setTriggerTuple(self,t):
self.triggertuple = t
@@ -255,7 +267,9 @@
sp = []
for scheduler in self.schedulerNames:
for port in self.build.getProperty("subportlist").split():
- sp.append([scheduler,{"portname": port}])
+ props = self.set_properties
+ props["portname"] = port
+ sp.append([scheduler, props])
return sp
@@ -280,6 +294,7 @@
portwatcher_factory.addStep(TriggerWithPortlist(
schedulerNames=[triggerable],
+ set_properties={"triggered_by": make_triggeredby_url},
waitForFinish=True,
updateSourceStamp=True))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160325/156465c1/attachment.html>
More information about the macports-changes
mailing list