From 310c1e1dffd2233d5ca474b8153e7f880cda48ca Mon Sep 17 00:00:00 2001 From: madavi Date: Mon, 1 Jul 2019 16:53:08 +0530 Subject: [PATCH] improvement to 792, exception remove during docker rm Change-Id: Ia4e9810d7d8ca86fbd60523cc32e6df2ae07c31b Signed-off-by: madavi --- jenkins/ci-pipelines/ci_stage_3.groovy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index e6264e59..935c6708 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -230,7 +230,12 @@ node("${params.NODE}") { repo_base_url = "-u ${params.REPOSITORY_BASE}" } if ( params.DO_STAGE_4 ) { - sh "docker stack list | grep v60 | awk '{ print \$1 }'| xargs docker stack rm" + try { + sh "docker stack list | grep v60 | awk '{ print \$1 }'| xargs docker stack rm " + } + catch (caughtError) { + println("FAILURE:: Docker remove gave exception, pls check & remove old dockers manually, if required !!!") + } } sh """ export PATH=$PATH:/snap/bin -- 2.25.1