Merge "full_install_osm.sh: point to ReleaseSIX by default"
diff --git a/jenkins/ci-pipelines/ci_stage_1.groovy b/jenkins/ci-pipelines/ci_stage_1.groovy
index 2602e8f..96918b2 100644
--- a/jenkins/ci-pipelines/ci_stage_1.groovy
+++ b/jenkins/ci-pipelines/ci_stage_1.groovy
@@ -88,8 +88,7 @@
         downstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
 
         println("TEST_INSTALL = ${params.TEST_INSTALL}, downstream job: ${downstream_job_name}")
-        
-		// Jayant : once email is successful, enable the email only on failure
+
         stage_3_merge_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true
         if (stage_3_merge_result.getResult() != 'SUCCESS') {
             project = stage_3_merge_result.getProjectName()
@@ -98,10 +97,13 @@
         }
     }
 	stage('Send Email') {
-      emailext (
-           subject: "[OSM-Jenkins] ${stage_3_merge_result.getResult()} Job '${env.JOB_NAME} ${env.BUILD_NUMBER}'",
-           body: """<p>Check console output at <a href="${env.BUILD_URL}">${env.JOB_NAME}</a></p>""",
-           to: 'JM00553988@techmahindra.com'
-      )
+        if((stage_3_merge_result.getResult() != 'SUCCESS') && (${env.JOB_NAME} == 'daily-stage_4')){
+            emailext (
+                subject: "[OSM-Jenkins] Job: ${env.JOB_NAME} Build: ${env.BUILD_NUMBER} Result: ${stage_3_merge_result.getResult()}",
+                body: """ Check console output at "${env.BUILD_URL}"  """,
+                to: 'OSM_MDL@list.etsi.org',
+                recipientProviders: [culprits()]
+            )
+        }
     }
 }
diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy
index 283b042..b698bc2 100644
--- a/jenkins/ci-pipelines/ci_stage_3.groovy
+++ b/jenkins/ci-pipelines/ci_stage_3.groovy
@@ -32,7 +32,7 @@
         string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
         string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
         string(defaultValue: 'releasesix-daily', description: '', name: 'DOCKER_TAG'),
-        booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
+        booleanParam(defaultValue: true, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_PASS'),
         booleanParam(defaultValue: true, description: '', name: 'SAVE_ARTIFACTS_ON_SMOKE_SUCCESS'),
         booleanParam(defaultValue: true, description: '', name: 'DO_STAGE_4'),
@@ -229,7 +229,7 @@
                     {
                         repo_base_url = "-u ${params.REPOSITORY_BASE}"
                     }
-             
+                    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 \