summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-02-06 04:06:40 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-02-06 04:06:40 +0100
commitc6d43b1274c044c275f8dbea343aff33593a7485 (patch)
treea258df7a7e2e95a62b0bdeaf7ea97b986c7527a7
parent94c7476dc8dc7a343e036d0cfaf52514d5c08610 (diff)
downloaddeployment-c6d43b1274c044c275f8dbea343aff33593a7485.tar.gz
deployment-c6d43b1274c044c275f8dbea343aff33593a7485.tar.bz2
deployment-c6d43b1274c044c275f8dbea343aff33593a7485.zip
build docs the same way as blue/green
-rwxr-xr-xbuildbot/build-docs.sh14
-rw-r--r--buildbot/master.cfg24
-rwxr-xr-xtaler-build/update_manual.sh13
-rw-r--r--taler-docbuild/.gitignore1
-rw-r--r--taler-docbuild/Makefile40
-rw-r--r--taler-docbuild/README2
-rwxr-xr-xtaler-docbuild/invalidate.sh13
-rwxr-xr-xtaler-docbuild/update_api.sh17
-rwxr-xr-xtaler-docbuild/update_doc_backoffice.sh (renamed from taler-build/update_doc_backoffice.sh)0
-rwxr-xr-xtaler-docbuild/update_doc_bank.sh (renamed from taler-build/update_doc_bank.sh)0
-rwxr-xr-xtaler-docbuild/update_doc_exchange.sh (renamed from taler-build/update_doc_exchange.sh)0
-rwxr-xr-xtaler-docbuild/update_doc_landing.sh (renamed from taler-build/update_doc_landing.sh)0
-rwxr-xr-xtaler-docbuild/update_doc_merchant.sh (renamed from taler-build/update_doc_merchant.sh)0
-rwxr-xr-xtaler-docbuild/update_onboarding.sh (renamed from taler-build/update_onboarding.sh)0
-rwxr-xr-xtaler-docbuild/update_tutorials.sh (renamed from taler-build/update_tutorials.sh)0
-rwxr-xr-xtaler-docbuild/update_www_and_stage.sh (renamed from taler-build/update_www_and_stage.sh)0
16 files changed, 91 insertions, 33 deletions
diff --git a/buildbot/build-docs.sh b/buildbot/build-docs.sh
new file mode 100755
index 0000000..92f5078
--- /dev/null
+++ b/buildbot/build-docs.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -eu
+
+cd $HOME/deployment
+
+# like "git pull", but discard local changes
+git fetch
+git reset --hard FETCH_HEAD
+
+cd $HOME/deployment/taler-docbuild
+./invalidate.sh
+
+make
diff --git a/buildbot/master.cfg b/buildbot/master.cfg
index 2ba4e4e..68761e8 100644
--- a/buildbot/master.cfg
+++ b/buildbot/master.cfg
@@ -266,32 +266,16 @@ SELENIUM_FACTORY.addStep(ShellCommand(
command=["launch_selenium_test"],
env={'PATH': "${HOME}/local/bin:/usr/lib/chromium:${PATH}"}))
-def doc_dispatcher(project):
- switch = {
- "docs-landing": ["./update_doc_landing.sh"],
- "api": ["./update_api.sh"],
- "backoffice": ["./update_doc_backoffice.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"],
- "help": ["echo", "dispatcher", "debug"]
- }
- # Force schedules trigger the default.
- return switch.get(project, "./update_api.sh")
-
DOC_FACTORY = util.BuildFactory()
DOC_FACTORY.addStep(git_step(
"git://git.taler.net/deployment.git"))
DOC_FACTORY.addStep(ShellCommand(
name="build docs",
- description="Building documentation.",
+ description="Building documentation",
descriptionDone="Documentation built.",
- command=util.Transform(doc_dispatcher,
- util.Property("project")),
- workdir="build/taler-build"))
+ command=["./build-docs.sh"],
+ workdir="build/buildbot",
+ haltOnFailure=True))
DEBUG_BUILDER = util.BuilderConfig(
name="debug-builder",
diff --git a/taler-build/update_manual.sh b/taler-build/update_manual.sh
deleted file mode 100755
index f18ebf1..0000000
--- a/taler-build/update_manual.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-cd /var/www/merchant/
-git clean -fdx
-git fetch
-# reset to updated upstream branch, but only if we're tracking a branch
-branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD)
-git reset --hard "$branch"
-
-./bootstrap
-./configure
-cd doc/
-make
diff --git a/taler-docbuild/.gitignore b/taler-docbuild/.gitignore
new file mode 100644
index 0000000..c337aa9
--- /dev/null
+++ b/taler-docbuild/.gitignore
@@ -0,0 +1 @@
+*-stamp
diff --git a/taler-docbuild/Makefile b/taler-docbuild/Makefile
new file mode 100644
index 0000000..ce75e67
--- /dev/null
+++ b/taler-docbuild/Makefile
@@ -0,0 +1,40 @@
+all: api-stamp backoffice bank-stamp exchange-stamp
+all: docs-landing-stamp merchant-stamp
+all: www.taler.net-stamp stage.taler.net-stamp
+
+
+api-stamp:
+ ./update_api.sh
+ touch $@
+
+backoffice-stamp:
+ ./update_doc_backoffice.sh
+ touch $@
+
+bank-stamp:
+ ./update_doc_bank.sh
+ touch $@
+
+landing-stamp:
+ ./update_doc_landing.sh
+ touch $@
+
+merchant-stamp:
+ ./update_doc_merchant.sh
+ touch $@
+
+deployment-stamp:
+ ./update_onboarding.sh
+ touch $@
+
+tutorials-stamp:
+ ./update_tutorials.sh
+ touch $@
+
+stage.taler.net-stamp:
+ ./update_www_and_stage.sh
+ touch $@
+
+www.taler.net-stamp:
+ ./update_www_and_stage.sh
+ touch $@
diff --git a/taler-docbuild/README b/taler-docbuild/README
new file mode 100644
index 0000000..115fe29
--- /dev/null
+++ b/taler-docbuild/README
@@ -0,0 +1,2 @@
+Makefile for all taler components, using one timestamp
+file in this folder to represent each component.
diff --git a/taler-docbuild/invalidate.sh b/taler-docbuild/invalidate.sh
new file mode 100755
index 0000000..e094441
--- /dev/null
+++ b/taler-docbuild/invalidate.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -eu
+components="merchant exchange backoffice stage.taler.net www.taler.net api docs-landing"
+
+for component in $components ; do
+ cd $HOME/$component
+ git fetch
+ if git status -sb | grep behind; then
+ echo "invalidating $component"
+ rm -f $HOME/deployment/taler-docbuild/$component-stamp
+ fi
+done
diff --git a/taler-docbuild/update_api.sh b/taler-docbuild/update_api.sh
new file mode 100755
index 0000000..ec0cc0d
--- /dev/null
+++ b/taler-docbuild/update_api.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -eu
+
+fetch () {
+ git clean -fdx
+ git fetch
+ # reset to updated upstream branch, but only if we're tracking a branch
+ branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo head)
+ git reset --hard "$branch"
+}
+
+cd $HOME/api
+fetch
+make html
+cp -r _build/html/* $HOME/build/api/html/
+
diff --git a/taler-build/update_doc_backoffice.sh b/taler-docbuild/update_doc_backoffice.sh
index dc5d773..dc5d773 100755
--- a/taler-build/update_doc_backoffice.sh
+++ b/taler-docbuild/update_doc_backoffice.sh
diff --git a/taler-build/update_doc_bank.sh b/taler-docbuild/update_doc_bank.sh
index 3c8a6ac..3c8a6ac 100755
--- a/taler-build/update_doc_bank.sh
+++ b/taler-docbuild/update_doc_bank.sh
diff --git a/taler-build/update_doc_exchange.sh b/taler-docbuild/update_doc_exchange.sh
index f5054d0..f5054d0 100755
--- a/taler-build/update_doc_exchange.sh
+++ b/taler-docbuild/update_doc_exchange.sh
diff --git a/taler-build/update_doc_landing.sh b/taler-docbuild/update_doc_landing.sh
index bbc0086..bbc0086 100755
--- a/taler-build/update_doc_landing.sh
+++ b/taler-docbuild/update_doc_landing.sh
diff --git a/taler-build/update_doc_merchant.sh b/taler-docbuild/update_doc_merchant.sh
index abc4c10..abc4c10 100755
--- a/taler-build/update_doc_merchant.sh
+++ b/taler-docbuild/update_doc_merchant.sh
diff --git a/taler-build/update_onboarding.sh b/taler-docbuild/update_onboarding.sh
index 9e38c80..9e38c80 100755
--- a/taler-build/update_onboarding.sh
+++ b/taler-docbuild/update_onboarding.sh
diff --git a/taler-build/update_tutorials.sh b/taler-docbuild/update_tutorials.sh
index cef16ca..cef16ca 100755
--- a/taler-build/update_tutorials.sh
+++ b/taler-docbuild/update_tutorials.sh
diff --git a/taler-build/update_www_and_stage.sh b/taler-docbuild/update_www_and_stage.sh
index a57c889..a57c889 100755
--- a/taler-build/update_www_and_stage.sh
+++ b/taler-docbuild/update_www_and_stage.sh