diff --git a/Jenkinsfile b/Jenkinsfile index 59473018..14ee607a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -189,9 +189,9 @@ pipeline { sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; LD_LIBRARY_PATH="`pwd`/src/.libs:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH; make LD_LIBRARY_PATH="$LD_LIBRARY_PATH" check' } catch (Exception e) { - dir("..") { - archiveArtifacts artifacts: "**/test-suite.log", allowEmpty: true - } + sh 'D="`pwd`"; B="`basename "$D"`" ; tar czf test-suite_"$B".tgz `find . -name '*.trs'` `find . -name '*.log'`' + archiveArtifacts artifacts: "**/test-suite*.tgz", allowEmpty: true + throw e } } } @@ -218,9 +218,9 @@ pipeline { sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; LD_LIBRARY_PATH="`pwd`/src/.libs:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH; make LD_LIBRARY_PATH="$LD_LIBRARY_PATH" check' } catch (Exception e) { - dir("..") { - archiveArtifacts artifacts: "**/test-suite.log", allowEmpty: true - } + sh 'D="`pwd`"; B="`basename "$D"`" ; tar czf test-suite_"$B".tgz `find . -name '*.trs'` `find . -name '*.log'`' + archiveArtifacts artifacts: "**/test-suite*.tgz", allowEmpty: true + throw e } } } @@ -247,9 +247,9 @@ pipeline { sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; LD_LIBRARY_PATH="`pwd`/src/.libs:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH; make LD_LIBRARY_PATH="$LD_LIBRARY_PATH" memcheck && exit 0 ; echo "Re-running failed ($?) memcheck with greater verbosity" >&2 ; make LD_LIBRARY_PATH="$LD_LIBRARY_PATH" VERBOSE=1 memcheck-verbose' } catch (Exception e) { - dir("..") { - archiveArtifacts artifacts: "**/test-suite.log", allowEmpty: true - } + sh 'D="`pwd`"; B="`basename "$D"`" ; tar czf test-suite_"$B".tgz `find . -name '*.trs'` `find . -name '*.log'`' + archiveArtifacts artifacts: "**/test-suite*.tgz", allowEmpty: true + throw e } } } @@ -276,9 +276,9 @@ pipeline { sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; LD_LIBRARY_PATH="`pwd`/src/.libs:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH; make LD_LIBRARY_PATH="$LD_LIBRARY_PATH" memcheck && exit 0 ; echo "Re-running failed ($?) memcheck with greater verbosity" >&2 ; make LD_LIBRARY_PATH="$LD_LIBRARY_PATH" VERBOSE=1 memcheck-verbose' } catch (Exception e) { - dir("..") { - archiveArtifacts artifacts: "**/test-suite.log", allowEmpty: true - } + sh 'D="`pwd`"; B="`basename "$D"`" ; tar czf test-suite_"$B".tgz `find . -name '*.trs'` `find . -name '*.log'`' + archiveArtifacts artifacts: "**/test-suite*.tgz", allowEmpty: true + throw e } } } @@ -305,9 +305,9 @@ pipeline { sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; LD_LIBRARY_PATH="`pwd`/src/.libs:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH; DISTCHECK_CONFIGURE_FLAGS="--enable-drafts=yes --with-docs=no" ; export DISTCHECK_CONFIGURE_FLAGS; make DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" distcheck' } catch (Exception e) { - dir("..") { - archiveArtifacts artifacts: "**/test-suite.log", allowEmpty: true - } + sh 'D="`pwd`"; B="`basename "$D"`" ; tar czf test-suite_"$B".tgz `find . -name '*.trs'` `find . -name '*.log'`' + archiveArtifacts artifacts: "**/test-suite*.tgz", allowEmpty: true + throw e } } } @@ -334,9 +334,9 @@ pipeline { sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; LD_LIBRARY_PATH="`pwd`/src/.libs:$LD_LIBRARY_PATH"; export LD_LIBRARY_PATH; DISTCHECK_CONFIGURE_FLAGS="--enable-drafts=no --with-docs=no" ; export DISTCHECK_CONFIGURE_FLAGS; make DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" distcheck' } catch (Exception e) { - dir("..") { - archiveArtifacts artifacts: "**/test-suite.log", allowEmpty: true - } + sh 'D="`pwd`"; B="`basename "$D"`" ; tar czf test-suite_"$B".tgz `find . -name '*.trs'` `find . -name '*.log'`' + archiveArtifacts artifacts: "**/test-suite*.tgz", allowEmpty: true + throw e } } }