summaryrefslogtreecommitdiff
path: root/buildbot
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2017-11-28 17:43:41 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2017-11-28 17:43:41 +0100
commit7fe2d9b167984dd9f1c55865feca2b5729bfb44a (patch)
tree6286bd724eecf1d5a007d8df8b22f44ac6aafbea /buildbot
parent1539e1bf73728240f78e09628cb0dd18745998ef (diff)
downloaddeployment-7fe2d9b167984dd9f1c55865feca2b5729bfb44a.tar.gz
deployment-7fe2d9b167984dd9f1c55865feca2b5729bfb44a.tar.bz2
deployment-7fe2d9b167984dd9f1c55865feca2b5729bfb44a.zip
doc builder calls doc updater via a project-based switch
Diffstat (limited to 'buildbot')
-rw-r--r--buildbot/master.cfg40
1 files changed, 25 insertions, 15 deletions
diff --git a/buildbot/master.cfg b/buildbot/master.cfg
index 6e4cf94..35559b5 100644
--- a/buildbot/master.cfg
+++ b/buildbot/master.cfg
@@ -56,11 +56,22 @@ c["change_source"] = [ALLCS]
# Re-build documentation periodically
+def doc_filter(change):
+ changes = change.asDict()
+ if changes.get("project") in ["api", "www"]:
+ return True
+ files = changes.get("files")
+ for file in files:
+ if re.search(r"doc|manual", file):
+ return True
+ return False
+
DOC_SCHEDULER = schedulers.SingleBranchScheduler(
name="periodic-doc-scheduler",
builderNames=["doc-builder"],
change_filter=util.ChangeFilter(
branch="master",
+ filter_fn=doc_filter,
project_re="api|www|bank|exchange|merchant|deployment|merchant-frontend-examples"),
treeStableTimer=None)
@@ -112,7 +123,7 @@ FORCE_SCHEDULER = schedulers.ForceScheduler(
"switcher-builder",
"doc-builder",
"wallet-builder",
- "lint-builder"])
+ "lint-builder"])
c["schedulers"] = [
DOC_SCHEDULER,
@@ -230,7 +241,18 @@ SELENIUM_FACTORY.addStep(ShellCommand(
command=["launch_selenium_test"],
env={'PATH': "${HOME}/local/bin:/usr/lib/chromium:${PATH}"}))
-# this factory builds {api,docs}.taler.net AND {www,stage}.taler.net
+def doc_dispatcher(project):
+ switch = {
+ "api": "./update_api.sh",
+ "www": "./update_www_and_stage.sh",
+ "bank": "./update_bank.sh",
+ "merchant": "./update_doc_merchant.sh",
+ "exchange": "./update_doc_exchange.sh",
+ "merchant-frontend-examples": "./update_tutorials.sh",
+ "deployment": "./update_onboarding.sh",
+ }
+ return switch[project]
+
DOC_FACTORY = util.BuildFactory()
DOC_FACTORY.addStep(git_step(
"git://git.taler.net/deployment.git"))
@@ -238,19 +260,7 @@ DOC_FACTORY.addStep(ShellCommand(
name="build docs",
description="Building documentation.",
descriptionDone="Documentation built.",
- command=["./update_docs.sh"],
- workdir="build/taler-build"))
-DOC_FACTORY.addStep(ShellCommand(
- name="build www",
- description="Building www.taler.net.",
- descriptionDone="www.taler.net built",
- command=["./update_www.sh"],
- workdir="build/taler-build"))
-DOC_FACTORY.addStep(ShellCommand(
- name="build www-stage",
- description="Building stage.taler.net.",
- descriptionDone="stage.taler.net built",
- command=["./update_stage.sh"],
+ command=[doc_dispacther(util.Interpolate("%(prop:project)s"))],
workdir="build/taler-build"))
DEBUG_BUILDER = util.BuilderConfig(