bug 745 improvement fixed

Change-Id: If08c4a78291166ac9e834f53f4578595b5a1fca9
Signed-off-by: madavi <jm00553988@techmahindra.com>
diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy
index 9620ead..1a4c009 100644
--- a/jenkins/ci-pipelines/ci_stage_3.groovy
+++ b/jenkins/ci-pipelines/ci_stage_3.groovy
@@ -229,7 +229,9 @@
                     {
                         repo_base_url = "-u ${params.REPOSITORY_BASE}"
                     }
-                    sh "docker stack list |  awk '{ print \$1 }'| xargs docker stack rm"
+					if ( params.DO_STAGE_4 ) {
+                        sh "docker stack list |  awk '{ print \$1 }'| xargs docker stack rm"
+					}
                     sh """
                         export PATH=$PATH:/snap/bin
                         installers/full_install_osm.sh -y -s ${container_name} --test --nolxd --nodocker --nojuju --nohostports --nohostclient \