X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=2e2bf08772f71a044238ca044579a73c9dd1babe;hb=1f405cf638cf081ca53777336eefb7e245c6ca92;hp=52aa3b2fabb06bb85f9746cb2a0ea128c4223d45;hpb=515503e249283b6e0a2ccd5b4c134fa7a5572647;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 52aa3b2f..2e2bf087 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -235,15 +235,17 @@ node("${params.NODE}") { finally { sh "docker stop ${http_server_name}" - if (error) { - if ( !params.SAVE_CONTAINER_ON_FAIL ) { - sh "lxc delete ${container_name} --force" + if ( params.DO_INSTALL ) { + if (error) { + if ( !params.SAVE_CONTAINER_ON_FAIL ) { + sh "lxc delete ${container_name} --force" + } + throw error } - throw error - } - else { - if ( !params.SAVE_CONTAINER_ON_PASS ) { - sh "lxc delete ${container_name} --force" + else { + if ( !params.SAVE_CONTAINER_ON_PASS ) { + sh "lxc delete ${container_name} --force" + } } } }