From 9dc28c3c1e99844dedd3abe53733fd6d4ecda742 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Tue, 18 Jan 2022 10:32:38 +0100 Subject: [PATCH] OZG-1784 jenkinsfile --- Jenkinsfile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a4877e5443..a5d28f3685 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -166,7 +166,7 @@ pipeline { shutdownEnvironment(namespace) - if(testResult != "0") { + if(!testResult) { E2E_FAILED += "${stageName}, " error("Fehler in Stage ${stageName}") } @@ -206,7 +206,7 @@ pipeline { shutdownEnvironment(namespace) - if(testResult != "0") { + if(!testResult) { E2E_FAILED += "${stageName}, " error("Fehler in Stage ${stageName}") } @@ -370,10 +370,16 @@ Void startGoofy(String namespace, String values, String imageTag) { String runTests(String stageName, String reportFolder) { container("cypress") { - def configFile = generateCypressConfig(stageName, reportFolder) - dir("goofy-client") { - sh "npm run cypress:version" - return sh (script: "npm run cypress:ci-run --CONFIG_FILE=${configFile} --REPORT_FOLDER=${reportFolder}", returnStatus: true) + try { + def configFile = generateCypressConfig(stageName, reportFolder) + dir("goofy-client") { + sh "npm run cypress:version" + sh "npm run cypress:ci-run --CONFIG_FILE=${configFile} --REPORT_FOLDER=${reportFolder}" + + return true + } + } catch (Exception e) { + return false } } } -- GitLab