diff options
author | Oliver Smith <osmith@sysmocom.de> | 2018-11-30 17:08:51 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2018-12-05 13:10:55 +0100 |
commit | 9c4a6facdbce004fcad01f274714bf458b0beadf (patch) | |
tree | 8f818e3c97495ba1a1850d78a50f445d89413988 | |
parent | c606103d9f6dd406c59c4927f703281d7817f5c9 (diff) |
contrib/jenkins_*.sh: build and publish manuals
Add new environment variables WITH_MANUALS and PUBLISH to control if
the manuals should be built and uploaded. Describe all environment vars
on top of jenkins_bts_model.sh. Change the top description line to look
like all the other contrib/jenkins.sh files (from other repositories),
so it is clear that this is the entry point of Jenkins (and not the
other contrib/jenkins_*.sh scripts).
When WITH_MANUALS is set, install osmo-gsm-manuals like any other
dependency and add --enable-manuals to the configure flags (for "make"
and "make distcheck"). Add the bin subdir of the installed files to
PATH, so osmo-gsm-manuals-check-depends can be used by ./configure.
Related: OS#3385
Change-Id: If51194cc595bd8cf1081b35ab0e1a5ddcd448860
-rwxr-xr-x | contrib/jenkins_bts_model.sh | 12 | ||||
-rw-r--r-- | contrib/jenkins_common.sh | 13 |
2 files changed, 23 insertions, 2 deletions
diff --git a/contrib/jenkins_bts_model.sh b/contrib/jenkins_bts_model.sh index 9aa943fa..ac85c305 100755 --- a/contrib/jenkins_bts_model.sh +++ b/contrib/jenkins_bts_model.sh @@ -1,6 +1,14 @@ #!/bin/sh -# this is a dispatcher script which will call the bts-model-specific -# script based on the bts model specified as command line argument +# jenkins build helper script for osmo-bts. This is how we build on jenkins.osmocom.org +# +# environment variables: +# * FIRMWARE_VERSION: which firmware version to build ("master", "femtobts_v2.7", ...) +# * WITH_MANUALS: build manual PDFs if set to "1" +# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1") +# +# usage: jenkins_bts_model.sh BTS_MODEL +# * BTS_MODEL: which BTS model specific script to run ("sysmo", "oct", ...) +# bts_model="$1" diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh index bdb12d55..fd0359bf 100644 --- a/contrib/jenkins_common.sh +++ b/contrib/jenkins_common.sh @@ -38,10 +38,23 @@ build_bts() { osmo-deps.sh libosmocore cd $base shift + + # Manuals: build conf_flags="$*" + if [ "$WITH_MANUALS" = "1" ]; then + conf_flags="$conf_flags --enable-manuals" + osmo-build-dep.sh osmo-gsm-manuals + export PATH="$inst/bin:$PATH" + fi + autoreconf --install --force ./configure $conf_flags $MAKE $PARALLEL_MAKE $MAKE check || cat-testlogs.sh DISTCHECK_CONFIGURE_FLAGS="$conf_flags" $MAKE distcheck || cat-testlogs.sh + + # Manuals: publish + if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then + $MAKE -C "$base/doc/manuals" publish + fi } |