improvement to 792, exception remove during docker rm 33/7733/1 v6.0.1
authormadavi <jm00553988@techmahindra.com>
Mon, 1 Jul 2019 11:23:08 +0000 (16:53 +0530)
committermadavi <jm00553988@techmahindra.com>
Mon, 1 Jul 2019 11:23:08 +0000 (16:53 +0530)
Change-Id: Ia4e9810d7d8ca86fbd60523cc32e6df2ae07c31b
Signed-off-by: madavi <jm00553988@techmahindra.com>
jenkins/ci-pipelines/ci_stage_3.groovy

index e6264e5..935c670 100644 (file)
@@ -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