From 4728bd16b9bc5da5424d69453bc9b86cfded1dcf Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Wed, 30 Oct 2024 10:44:48 +0100 Subject: [PATCH] small fix --- Jenkinsfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a62797b..17e597a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -350,14 +350,15 @@ def deploy(String service, String version, String host, String foo){ git pull; """) def statusCode = sh( script: "./deployService.sh $service $version $host $foo;", returnStatus: true); + sh(""" + echo " last exit code \$?"; + """) + println("Deploy statusCode value: "+statusCode); + if (statusCode != 0){ + currentBuild.result = 'FAILURE' + } } - sh(""" - echo " last exit code \$?"; - """) - println("Deploy statusCode value: "+statusCode); - if (statusCode != 0){ - currentBuild.result = 'FAILURE' - } + }