Merge "Disable parallel make for easier debugging"
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index 1d1527c..ec4cdaf 100644 (file)
@@ -122,6 +122,9 @@ node("${params.NODE}") {
                     // the upstream job name contains suffix with the project. Need this stripped off
                     def project_without_branch = params.UPSTREAM_JOB_NAME.split('/')[0]
 
+                    // Remove the previous artifact for this component. Use the new upstream artifact
+                    sh "rm -rf pool/${component}"
+
                     ci_helper.get_archive(params.ARTIFACTORY_SERVER,component,GERRIT_BRANCH, "${project_without_branch} :: ${GERRIT_BRANCH}", build_num)
 
                     sh "rm -rf dists"
@@ -173,7 +176,7 @@ node("${params.NODE}") {
         if ( params.DO_BUILD ) {
             stage("Build") {
                 sh "make -C docker clean"
-                sh "make -j4 -C docker CMD_DOCKER_ARGS= TAG=${container_name} RELEASE=${params.RELEASE} REPOSITORY_BASE=${repo_base_url} REPOSITORY_KEY=${params.REPO_KEY_NAME} REPOSITORY=${params.REPO_DISTRO}"
+                sh "make -C docker Q= CMD_DOCKER_ARGS= TAG=${container_name} RELEASE=${params.RELEASE} REPOSITORY_BASE=${repo_base_url} REPOSITORY_KEY=${params.REPO_KEY_NAME} REPOSITORY=${params.REPO_DISTRO}"
             }
         }
 
@@ -232,7 +235,10 @@ node("${params.NODE}") {
                 stage("Smoke") {
                     run_systest(container_name,container_name,"smoke")
                     // archive smoke success until stage_4 is ready
-                    stage_archive = params.SAVE_ARTIFACTS_ON_SMOKE_SUCCESS
+
+                    if ( ! currentBuild.result.equals('UNSTABLE') ) {
+                        stage_archive = params.SAVE_ARTIFACTS_ON_SMOKE_SUCCESS
+                    }
                 }
             }