From 85a02129595037060b0b56b535c9b770d3520ff7 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Wed, 8 Mar 2023 16:51:12 +0100 Subject: [PATCH] add error call in order to stop the whole pipeline if an error occur --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 493decd..5479f1b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -279,6 +279,7 @@ def deploy(String service, String version, String host){ println("Deploy ended with status: "+statusCode); if (statusCode > 0){ currentBuild.buildResult= 'FAILURE' + error("Ansible run failed with the following statusCode "+statusCode) } }