diff options
authorOliver Smith <>2018-12-07 14:19:46 +0100
committerOliver Smith <>2018-12-10 12:57:04 +0100
commit52e5797b3d80834033cf02ac06a0fd34017ddbfc (patch)
parentffe1b08c46c36f0f980bfee935fa3eaaedf76141 (diff)
contrib/jenkins*: build and publish manuals
Add contrib/, which clones or updates osmo-gsm-manuals and builds the manuals. When the environment variable PUBLISH=1 is set, it also uploads them. Call from, without PUBLISH=1, so the manuals get build-tested in the osmo-gsm-tester_gerrit job. A new job master-osmo-gsm-tester will be added in the future, which will run PUBLISH=1 The script does not use the osmo-ci.git scripts for installing dependencies and cleaning up the workspace. These scripts are not available on the node, which runs the osmo-gsm-tester_gerrit job, and it is not trivial to add just them (without building the osmo-ci Docker image etc.). The only dependency is osmo-gsm-manuals, and it does not need to be compiled, so it seemed to be the most maintainable solution to implement the clone/update and clean up in a few lines of shell code instead. Related: OS#3385 Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd
2 files changed, 41 insertions, 0 deletions
diff --git a/contrib/ b/contrib/
new file mode 100755
index 0000000..48f7780
--- /dev/null
+++ b/contrib/
@@ -0,0 +1,40 @@
+#!/bin/sh -ex
+# environment variables:
+# * PUBLISH: upload manuals after building if set to "1"
+export OSMO_GSM_MANUALS_DIR="$base/osmo-gsm-manuals"
+# Sanity check
+if ! [ -d "$base/doc/manuals" ]; then
+ echo "ERROR: this script needs to be executed from the top dir of osmo-gsm-tester.git."
+ exit 1
+# Clone/update osmo-gsm-manuals and wipe local modifications
+if [ -d "$OSMO_GSM_MANUALS_DIR" ]; then
+ git -C "$OSMO_GSM_MANUALS_DIR" pull
+ git clone "" "$OSMO_GSM_MANUALS_DIR"
+git -C "$OSMO_GSM_MANUALS_DIR" checkout -f HEAD
+# Copy manuals source to empty temp dir (so we can easily clean up afterwards)
+if [ -d "$temp" ]; then
+ rm -rf "$temp"
+cp -r "$base/doc/manuals" "$temp"
+# Build the manuals
+cd "$temp"
+make check
+# Publish
+if [ "$PUBLISH" = "1" ]; then
+ make publish
+# Clean up
+rm -r "$temp"
diff --git a/contrib/ b/contrib/
index 3017fd4..2a9bc82 100755
--- a/contrib/
+++ b/contrib/
@@ -8,6 +8,7 @@ test -x "$run_script"
cd osmo-gsm-tester
make deps
make check
cd "$base"
PATH="$base/osmo-gsm-tester/src:$PATH" \