[152494] contrib/buildbot-test/master.cfg
raimue at macports.org
raimue at macports.org
Sun Sep 11 07:38:14 PDT 2016
Revision: 152494
https://trac.macports.org/changeset/152494
Author: raimue at macports.org
Date: 2016-09-11 07:38:14 -0700 (Sun, 11 Sep 2016)
Log Message:
-----------
buildbot: builders for www and guide
This adds basic support for builders for www and guide. Both builders will
share the same build slave named "docs", which needs to be added to
slaves.json. If this slave is not available, the builders will not be added to
the master configuration.
Modified Paths:
--------------
contrib/buildbot-test/master.cfg
Modified: contrib/buildbot-test/master.cfg
===================================================================
--- contrib/buildbot-test/master.cfg 2016-09-11 14:22:44 UTC (rev 152493)
+++ contrib/buildbot-test/master.cfg 2016-09-11 14:38:14 UTC (rev 152494)
@@ -43,6 +43,7 @@
path_base = "/usr/bin:/bin:/usr/sbin:/sbin"
path_ports = os.path.join(config['toolsprefix'], "bin") + ":" + path_base
+path_docs = path_ports
# Allow spaces and tabs in property values
import re
@@ -117,14 +118,29 @@
return True
return False
+def change_has_guide(change):
+ for f in change.files:
+ if f.startswith('doc-new'):
+ return True
+ return False
+
+def change_has_www(change):
+ for f in change.files:
+ if f.startswith('www'):
+ return True
+ return False
+
from buildbot.changes.filter import ChangeFilter
portsfilter = ChangeFilter(filter_fn=change_has_ports)
basefilter = ChangeFilter(filter_fn=change_has_base)
+wwwfilter = ChangeFilter(filter_fn=change_has_www)
+guidefilter = ChangeFilter(filter_fn=change_has_guide)
base_buildernames = ["base-"+plat for plat in build_platforms if 'legacy' not in plat and '10.6_i386' not in plat]
portwatcher_buildernames = ["ports-"+plat+"-watcher" for plat in build_platforms if 'linux' not in plat]
portbuilder_buildernames = ["ports-"+plat+"-builder" for plat in build_platforms if 'linux' not in plat]
portbuilder_triggerables = ["ports-"+plat+"-trigger" for plat in build_platforms if 'linux' not in plat]
+docbuilder_buildernames = ["docs-www", "docs-guide"] if "docs" in slavedata['slaves'].keys() else []
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler
@@ -161,7 +177,23 @@
label="Port list:",
default="",
size=30)
- ])
+ ]),
+ SingleBranchScheduler(
+ name="www",
+ treeStableTimer=300,
+ change_filter = wwwfilter,
+ builderNames=docbuilder_buildernames),
+ SingleBranchScheduler(
+ name="guide",
+ treeStableTimer=300,
+ change_filter = guidefilter,
+ builderNames=docbuilder_buildernames),
+ ForceScheduler(
+ name="www_force",
+ builderNames=docbuilder_buildernames),
+ ForceScheduler(
+ name="guide_force",
+ builderNames=docbuilder_buildernames),
]
for i in range(len(portbuilder_buildernames)):
@@ -433,6 +465,26 @@
descriptionDone=["clean"],
alwaysRun=True))
+
+docs_www_factory = BuildFactory()
+docs_www_factory.addStep(SVN(
+ repourl='https://svn.macports.org/repository/macports/trunk/www',
+ method="copy"))
+# TODO: validate/lint files
+# TODO: deploy generated files
+# TODO: incremental mode with cleanup?
+
+docs_guide_factory = BuildFactory()
+docs_guide_factory.addStep(SVN(
+ repourl='https://svn.macports.org/repository/macports/trunk/doc-new',
+ method="copy"))
+# TODO: check for existance of tools in toolsprefix?
+docs_guide_factory.addStep(Compile(command="make validate"))
+docs_guide_factory.addStep(Compile(command="make all"))
+# TODO: deploy generated files
+# TODO: incremental mode with cleanup?
+
+
# === BUILDER CONFIGURATION ===
from buildbot.config import BuilderConfig
@@ -473,6 +525,21 @@
tags=["portbuilder", os_version],
env={"PATH": path_ports})]
+if "docs" in slavedata['slaves'].keys():
+ c['builders'] += [
+ BuilderConfig(
+ name="docs-www",
+ slavenames=["docs"],
+ factory=docs_www_factory,
+ tags=["docs", "www"],
+ env={"PATH": path_docs}),
+ BuilderConfig(
+ name="docs-guide",
+ slavenames=["docs"],
+ factory=docs_guide_factory,
+ tags=["docs", "guide"],
+ env={"PATH": path_docs})]
+
####### STATUS TARGETS
# 'status' is a list of Status Targets. The results of each build will be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160911/c3b8806e/attachment.html>
More information about the macports-changes
mailing list