Reorganization automation testing

-added logrotate for each template
-deleted maintenance job
-added upgrade to proposed logic

Related-Prod: PROD-36426
Change-Id: I4af290dcecc4ed7cef495eb9c8202077b2b0b46d

Change-Id: I84d374d2adad877976dffc8d98d3ad938364e8e9
diff --git a/jobs/pipelines/deploy-cicd-and-run-tests.groovy b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
index 52d982b..5a84c60 100644
--- a/jobs/pipelines/deploy-cicd-and-run-tests.groovy
+++ b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
@@ -11,6 +11,7 @@
 def batch_size = env.BATCH_SIZE ?: ''
 def dist_upgrade_nodes = "${env.DIST_UPGRADE_NODES}" != "false" ? true : false
 def upgrade_saltstack = "${env.UPGRADE_SALTSTACK}" != "false" ? true : false
+def run_upgrade_after_job = "${env.RUN_UPGRADE_AFTER_JOB}" != "false" ? true : false
 
 if (env_manager == 'devops') {
     jenkins_slave_node_name = "${NODE_NAME}"
@@ -148,7 +149,19 @@
         deploy(shared, common, steps, env_manager, batch_size, dist_upgrade_nodes, upgrade_saltstack)
         // run test stages
         test(shared, common, steps, env_manager)
-
+        //run upgrade env to proposed
+        if (run_upgrade_after_job) {
+            network_backend = env.PLATFORM_STACK_INSTALL.contains("contrail") ? 'contrail' : 'dvr'
+            upgrade_job = "mcp-update-${env.TEMPEST_IMAGE_VERSION}-${network_backend}-sl"
+              def deploy = build job: "${upgrade_job}",
+                  parameters: [
+                      string(name: 'PARENT_NODE_NAME', value: "openstack_slave_${env.LAB_CONFIG_NAME}"),
+                      string(name: 'TCP_QA_REFS', value: env.TCP_QA_REFS),
+                      string(name: 'NODE', value: "openstack_slave_${env.LAB_CONFIG_NAME}")
+                  ],
+                  wait: false,
+                  propagate: false
+        }
     } catch (e) {
         common.printMsg("Job is failed: " + e.message, "purple")
         throw e