Merge v8.0 Into Master
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index 8f79cd4..d87ad95 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Change log:
  * 1. Bug 745 : Jayant Madavi, Mrityunjay Yadav : JM00553988@techmahindra.com : 23-july-2019 : Improvement to the code, typically we have 2 *    or more branches whose build gets triggered, ex master & release branch, the previous code was removing any/all docker.
- *      Now removing previous docker of the same branch, so that the other branch failed docker should not be removed. It also
+ *       Now removing previous docker of the same branch, so that the other branch failed docker should not be removed. It also
  *    acts as clean-up for previous docker remove failure.
  * 2. Feature 7829 : Mrityunjay Yadav, Jayant Madavi: MY00514913@techmahindra.com : 19-Aug-2019 : Added a parameters & function to invoke Robot test.
  */
@@ -398,15 +398,15 @@ node("${params.NODE}") {
                 if (error) {
                     if ( !params.SAVE_CONTAINER_ON_FAIL ) {
                         uninstall_osm container_name
-                        sh "docker stop ${http_server_name}"
-                        sh "docker rm ${http_server_name}"
+                        sh "docker stop ${http_server_name} || true"
+                        sh "docker rm ${http_server_name} || true"
                     }
                 }
                 else {
                     if ( !params.SAVE_CONTAINER_ON_PASS ) {
                         uninstall_osm container_name
-                        sh "docker stop ${http_server_name}"
-                        sh "docker rm ${http_server_name}"
+                        sh "docker stop ${http_server_name} || true"
+                        sh "docker rm ${http_server_name} || true"
                     }
                 }
             }