add error call in order to stop the whole pipeline if an error occur

This commit is contained in:
Roberto Cirillo 2023-03-08 16:51:12 +01:00
parent d9f0f75853
commit 85a0212959
1 changed files with 1 additions and 0 deletions

1
Jenkinsfile vendored
View File

@ -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)
}
}