From 904771e9fa5849588e23753e8f48cef2b9d1b863 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Fri, 28 May 2021 09:58:12 +0200 Subject: [PATCH] CI: Fix error handler --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7d409bc9..664a0684 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,8 +59,10 @@ def jobMatrix(String type, List specs) { githubNotify(context: "${label}", description: 'Success', status: 'SUCCESS') } catch (e) { def tarball = "${type}_${job}_dds_logs.tar.gz" - sh "tar czvf ${tarball} -C \${WORKSPACE}/build/test .DDS/" - archiveArtifacts tarball + if (fileExists("build/test/.DDS")) { + sh "tar czvf ${tarball} -C \${WORKSPACE}/build/test .DDS/" + archiveArtifacts tarball + } deleteDir() githubNotify(context: "${label}", description: 'Error', status: 'ERROR')