Add pipeline to deploy random released MCP by schedule
Set 2019.2.7 versions to deploy in the released-* jobs

Change-Id: Id87d58ebedadd8baa62bb5e23a396b7f1106d55f
Related-Prod:#PROD-34546(PROD:34546)
diff --git a/jobs/templates/deploy-released.yml b/jobs/templates/deploy-released.yml
new file mode 100644
index 0000000..959962a
--- /dev/null
+++ b/jobs/templates/deploy-released.yml
@@ -0,0 +1,54 @@
+- job-template:
+    project-type: pipeline
+    description: '{job-description}'
+    concurrent: flase
+    disabled: false
+    sandbox: true
+    triggers:
+    - timed: H(20-30) 1 * * 1-5
+    name: deploy_bm
+    parameters:
+    - string:
+        default: sre-qa-ci-eu
+        description: ''
+        name: OS_CREDENTIALS
+        trim: 'false'
+    - text:
+        default: |-
+          released-heat-cicd-pike-contrail41-sl
+          released-heat-cicd-pike-dvr-sl
+          released-heat-cicd-queens-dvr-sl
+        description: List of stacks for deployment. Separated by newline
+        name: STACKS
+        trim: 'false'
+    - string:
+        default: ''
+        description: ''
+        name: TCP_QA_REFS
+        trim: 'false'
+    - string:
+        default: sre-team-infra
+        description: ''
+        name: PARENT_NODE_NAME
+        trim: 'false'
+    - string:
+        default: https://ic-eu.ssl.mirantis.net:5000/v3
+        description: ''
+        name: OS_AUTH_URL
+        trim: 'false'
+    - string:
+        default: sre-team
+        description: ''
+        name: OS_PROJECT_NAME
+        trim: 'false'
+    pipeline-scm:
+      lightweight-checkout: false
+      scm:
+      - git:
+          branches:
+          - FETCH_HEAD
+          refspec: '${{TCP_QA_REFS}}'
+          url: https://gerrit.mcp.mirantis.com/mcp/tcp-qa
+          clean:
+            before: true
+      script-path: jobs/pipelines/rotation-released-deployment.groovy
diff --git a/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml b/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml
index 22ebc40..7e03a30 100644
--- a/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml
+++ b/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml
@@ -33,7 +33,7 @@
         name: PLATFORM_STACK_INSTALL_TIMEOUT
         trim: 'false'
     - string:
-        default: 2019.2.0
+        default: 2019.2.7
         description: ''
         name: MCP_VERSION
         trim: 'false'
@@ -70,32 +70,50 @@
         name: TCP_QA_REFS
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: reference to patchset in pipeline-library
         name: PIPELINE_LIBRARY_REF
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: reference to patchset in mk-pipelines
         name: MK_PIPELINES_REF
         trim: 'false'
     - string:
-        default: 380f83f44ecca210825f3d3070a9c202e00adc58
+        default: refs/tags/2019.2.7
         description: Can be 'master' or 'proposed'. If empty, then takes ${{MCP_VERSION}}
           value
         name: COOKIECUTTER_TEMPLATE_COMMIT
         trim: 'false'
     - string:
-        default: c2458cb04793900195ee68a1e80edaf5c2cff7dc
+        default: refs/tags/2019.2.7
         description: Can be 'master' or 'proposed'. If empty, then takes ${{MCP_VERSION}}
           value
         name: SALT_MODELS_SYSTEM_COMMIT
         trim: 'false'
-    - string:
-        default: -m "run_cvp_func_sanity|run_tempest|run_stacklight"
+    - text:
+        default: |-
+          --keep-duplicates --maxfail=2
+            tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_drivetrain
+            tcp_tests/tests/system/test_upgrade_contrail.py::TestUpdateContrail
+            tcp_tests/tests/system/test_mcp_update.py::TestOpenstackUpdate
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_galera
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_rabbit
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_stacklight
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_ceph
+
+            tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
         description: |-
           Pytest option -k or -m, with expression to select necessary tests.
           Additional pytest options are allowed.
+          Procedure according to https://docs.mirantis.com/mcp/q4-18/mcp-release-notes/mu/mu-7/mu-7-apply-updates.html
         name: RUN_TEST_OPTS
         trim: 'false'
     - bool:
@@ -173,18 +191,18 @@
         name: LAB_PARAM_DEFAULTS
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: ''
         name: JENKINS_PIPELINE_BRANCH
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: ''
         name: MCP_COMMON_SCRIPTS_REFS
         trim: 'false'
     - string:
-        default: 2019.2.0
-        description: ''
+        default: 2019.2.7
+        description: 'for formula repo http://mirror.mirantis.com/update/${UPDATE_VERSION}/salt-formulas/xenial'
         name: UPDATE_VERSION
         trim: 'false'
     - string:
diff --git a/jobs/templates/released-heat-cicd-pike-dvr-sl.yml b/jobs/templates/released-heat-cicd-pike-dvr-sl.yml
index b297eda..c82f7da 100644
--- a/jobs/templates/released-heat-cicd-pike-dvr-sl.yml
+++ b/jobs/templates/released-heat-cicd-pike-dvr-sl.yml
@@ -33,7 +33,7 @@
         name: PLATFORM_STACK_INSTALL_TIMEOUT
         trim: 'false'
     - string:
-        default: 2019.2.0
+        default: 2019.2.7
         description: ''
         name: MCP_VERSION
         trim: 'false'
@@ -70,32 +70,49 @@
         name: TCP_QA_REFS
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: reference to patchset in pipeline-library
         name: PIPELINE_LIBRARY_REF
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: reference to patchset in mk-pipelines
         name: MK_PIPELINES_REF
         trim: 'false'
     - string:
-        default: 380f83f44ecca210825f3d3070a9c202e00adc58
+        default: refs/tags/2019.2.7
         description: Can be 'master' or 'proposed'. If empty, then takes ${{MCP_VERSION}}
           value
         name: COOKIECUTTER_TEMPLATE_COMMIT
         trim: 'false'
     - string:
-        default: c2458cb04793900195ee68a1e80edaf5c2cff7dc
+        default: refs/tags/2019.2.7
         description: Can be 'master' or 'proposed'. If empty, then takes ${{MCP_VERSION}}
           value
         name: SALT_MODELS_SYSTEM_COMMIT
         trim: 'false'
-    - string:
-        default: -m "run_cvp_func_sanity|run_tempest|run_stacklight"
+    - text:
+        default: |-
+          --keep-duplicates --maxfail=2
+            tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_drivetrain
+            tcp_tests/tests/system/test_mcp_update.py::TestOpenstackUpdate
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_galera
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_rabbit
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_stacklight
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_ceph
+
+            tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
         description: |-
           Pytest option -k or -m, with expression to select necessary tests.
           Additional pytest options are allowed.
+          Procedure according to https://docs.mirantis.com/mcp/q4-18/mcp-release-notes/mu/mu-7/mu-7-apply-updates.html
         name: RUN_TEST_OPTS
         trim: 'false'
     - bool:
@@ -173,7 +190,7 @@
         name: LAB_PARAM_DEFAULTS
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: ''
         name: JENKINS_PIPELINE_BRANCH
         trim: 'false'
@@ -183,12 +200,12 @@
         name: TEMPEST_PATTERN
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: ''
         name: MCP_COMMON_SCRIPTS_REFS
         trim: 'false'
     - string:
-        default: 2019.2.0
+        default: 2019.2.7
         description: ''
         name: UPDATE_VERSION
         trim: 'false'
diff --git a/jobs/templates/released-heat-cicd-queens-dvr-sl.yml b/jobs/templates/released-heat-cicd-queens-dvr-sl.yml
index 01cf37f..55d8142 100644
--- a/jobs/templates/released-heat-cicd-queens-dvr-sl.yml
+++ b/jobs/templates/released-heat-cicd-queens-dvr-sl.yml
@@ -33,7 +33,7 @@
         name: PLATFORM_STACK_INSTALL_TIMEOUT
         trim: 'false'
     - string:
-        default: 2019.2.0
+        default: 2019.2.7
         description: ''
         name: MCP_VERSION
         trim: 'false'
@@ -70,32 +70,49 @@
         name: TCP_QA_REFS
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: reference to patchset in pipeline-library
         name: PIPELINE_LIBRARY_REF
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: reference to patchset in mk-pipelines
         name: MK_PIPELINES_REF
         trim: 'false'
     - string:
-        default: 380f83f44ecca210825f3d3070a9c202e00adc58
+        default: refs/tags/2019.2.7
         description: Can be 'master' or 'proposed'. If empty, then takes ${{MCP_VERSION}}
           value
         name: COOKIECUTTER_TEMPLATE_COMMIT
         trim: 'false'
     - string:
-        default: c2458cb04793900195ee68a1e80edaf5c2cff7dc
+        default: refs/tags/2019.2.7
         description: Can be 'master' or 'proposed'. If empty, then takes ${{MCP_VERSION}}
           value
         name: SALT_MODELS_SYSTEM_COMMIT
         trim: 'false'
     - text:
-        default: -m "run_cvp_func_sanity|run_tempest|run_stacklight"
+        default: |-
+          --keep-duplicates --maxfail=2
+            tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_drivetrain
+            tcp_tests/tests/system/test_mcp_update.py::TestOpenstackUpdate
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_galera
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_rabbit
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_stacklight
+            tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_ceph
+
+            tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity
+            tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
         description: |-
           Pytest option -k or -m, with expression to select necessary tests.
           Additional pytest options are allowed.
+          Procedure according to https://docs.mirantis.com/mcp/q4-18/mcp-release-notes/mu/mu-7/mu-7-apply-updates.html
         name: RUN_TEST_OPTS
         trim: 'false'
     - bool:
@@ -173,7 +190,7 @@
         name: LAB_PARAM_DEFAULTS
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: ''
         name: JENKINS_PIPELINE_BRANCH
         trim: 'false'
@@ -183,12 +200,12 @@
         name: TEMPEST_PATTERN
         trim: 'false'
     - string:
-        default: refs/tags/2019.2.6
+        default: refs/tags/2019.2.7
         description: ''
         name: MCP_COMMON_SCRIPTS_REFS
         trim: 'false'
     - string:
-        default: 2019.2.0
+        default: 2019.2.7
         description: ''
         name: UPDATE_VERSION
         trim: 'false'