X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=42fbe1ee60b33702eefdc9e0d2cb78179ca828cb;hb=032bd77f7595a34063db4f30fa55c5db5998a76b;hp=1809d02b835e66ddae2d7c96c8502fdaae432333;hpb=dbe6cffce76d63abf34a0d9e47c6d5f015c513be;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