From a1de01474e013911bb99046e4138de3c675d98ac Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Thu, 15 Sep 2016 22:52:29 +0200 Subject: [PATCH] Jenkinsfile: Fix unstable status handling code. --- Jenkinsfile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b13b19bb..43e578c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -192,28 +192,28 @@ gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"]) } executions["$configuration on Linux"] = { node("docker && linux && amd64") { - def image = null - dir("src") { - checkout scm - image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins") - deleteDir() - } - image.inside { - doUnitTests("IW4x $configuration (unit tests)") + try { + def image = null + dir("src") { + checkout scm + image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins") + deleteDir() + } + image.inside { + doUnitTests("IW4x $configuration (unit tests)") + } + } catch (Exception e) { + if (isUnix()) { + manager.buildUnstable() + manager.addWarningBadge "$configuration unit test failed on Linux" + } else { + throw e + } } } } } - try { - parallel executions - } catch (Exception e) { - if (isUnix()) { - manager.buildUnstable() - manager.addWarningBadge "Unit tests failed on Linux" - } else { - throw e - } - } + parallel executions } }