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
This commit is contained in:
Oliver Smith 2018-11-30 17:08:51 +01:00
parent c606103d9f
commit 9c4a6facdb
2 changed files with 23 additions and 2 deletions

View File

@ -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"

View File

@ -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
}