X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;fp=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=42fbe1ee60b33702eefdc9e0d2cb78179ca828cb;hb=852a07d1b4a177726be0de5a364fc066839359b8;hp=1809d02b835e66ddae2d7c96c8502fdaae432333;hpb=7273dfbd2fc018915a5f68baf52dbfe86a8e0acb;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 1809d02b..42fbe1ee 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -235,7 +235,12 @@ node("${params.NODE}") { repo_base_url = "-u ${params.REPOSITORY_BASE}" } if ( params.DO_STAGE_4 ) { + try { sh "docker stack list |grep \"${container_name_prefix}\"| awk '{ print \$1 }'| xargs docker stack rm" + } + catch (caughtError) { + println("Caught error: docker stack rm failed!") + } } sh """ export PATH=$PATH:/snap/bin