laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/32939 )
Change subject: contrib/jenkins: create workspace.tar.xz on error ......................................................................
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: If7b4eb050e2b3f763b5cfddf1a5b6a18bb41f46e --- M contrib/jenkins.sh 1 file changed, 27 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 558b6dc..fc3eb12 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,6 +5,7 @@ # * IU: configure 3G support (values: "--enable-iu", "--disable-iu") # * 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) #
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then @@ -12,6 +13,16 @@ exit 2 fi
+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 +}
set -ex
@@ -64,11 +75,11 @@ ./configure --enable-sanitize --enable-werror --enable-smpp $IU --enable-external-tests $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-werror --enable-smpp $IU --enable-external-tests $CONFIG" \ $MAKE $PARALLEL_MAKE distcheck \ - || cat-testlogs.sh + || exit_tar_workspace
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then make -C "$base/doc/manuals" publish