contrib/jenkins: create workspace.tar.xz on error

In order to figure out why we sometimes get a coredump in the jenkins
master jobs, add a quick hack to get all relevant binaries on libraries
on error.

Related: OS#5665
Change-Id: I1439c06316edbe11f162c14774c2d507152b97a7
This commit is contained in:
Oliver Smith 2023-05-23 16:05:17 +02:00
parent 1f3bfff668
commit d33a66b779
1 changed files with 14 additions and 2 deletions

View File

@ -4,8 +4,20 @@
# environment variables:
# * WITH_MANUALS: build manual PDFs if set to "1"
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
# * IS_MASTER_BUILD: set to 1 when running from master-builds (not gerrit-verifications)
#
exit_tar_workspace() {
cat-testlogs.sh
if [ "$IS_MASTER_BUILD" = "1" ]; then
tar -cJf "/tmp/workspace.tar.xz" "$base"
mv /tmp/workspace.tar.xz "$base"
fi
exit 1
}
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
exit 2
@ -68,11 +80,11 @@ autoreconf --install --force
./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG
$MAKE $PARALLEL_MAKE
LD_LIBRARY_PATH="$inst/lib" $MAKE check \
|| cat-testlogs.sh
|| exit_tar_workspace
LD_LIBRARY_PATH="$inst/lib" \
DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror $CONFIG" \
$MAKE $PARALLEL_MAKE distcheck \
|| cat-testlogs.sh
|| exit_tar_workspace
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
make -C "$base/doc/manuals" publish