Change default values to release/tag/MCP_VERSION value for repos

Unbind ubuntu/foundation/vcp images from MCP_VERSION,
because no changes were  in images during the last updates

jenkins_pipelines_branch in reclass doesn't relate to
REPOSITORY_SUITE variable from tcp-qa


Change-Id: I3d33047ed6d32ad60a0ea5064e5bb484aad904e5
Related-Prod:#PROD-34612(PROD:34612)
diff --git a/jobs/pipelines/swarm-bootstrap-salt-cluster-heat.groovy b/jobs/pipelines/swarm-bootstrap-salt-cluster-heat.groovy
index bb602e0..bb734cb 100644
--- a/jobs/pipelines/swarm-bootstrap-salt-cluster-heat.groovy
+++ b/jobs/pipelines/swarm-bootstrap-salt-cluster-heat.groovy
@@ -46,9 +46,9 @@
 }
 
 currentBuild.description = "${PARENT_NODE_NAME}:${ENV_NAME}"
-def cfg01_day01_image_name = "cfg01-day01-${MCP_VERSION}"
-def ubuntu_vcp_image_name = "ubuntu-vcp-${MCP_VERSION}"
-def ubuntu_foundation_image_name = "ubuntu-16.04-foundation-${MCP_VERSION}"
+def cfg01_day01_image_name = "cfg01-day01-2019.2.0"
+def ubuntu_vcp_image_name = "ubuntu-vcp-2019.2.0"
+def ubuntu_foundation_image_name = "ubuntu-16.04-foundation-2019.2.0"
 
 timeout(time: 2, unit: 'HOURS') {
 node ("${PARENT_NODE_NAME}") {
diff --git a/jobs/templates/2019.2.0-heat-cicd-pike-dvr-sl.yml b/jobs/templates/2019.2.0-heat-cicd-pike-dvr-sl.yml
index e13e7e4..44be7a1 100644
--- a/jobs/templates/2019.2.0-heat-cicd-pike-dvr-sl.yml
+++ b/jobs/templates/2019.2.0-heat-cicd-pike-dvr-sl.yml
@@ -38,12 +38,12 @@
         name: MCP_VERSION
         trim: 'false'
     - string:
-        default: jenkins-master-si
+        default: sre-team-infra
         description: ''
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/2019.2.0-heat-cicd-queens-contrail41-sl.yml b/jobs/templates/2019.2.0-heat-cicd-queens-contrail41-sl.yml
index 9427ea4..7265aa4 100644
--- a/jobs/templates/2019.2.0-heat-cicd-queens-contrail41-sl.yml
+++ b/jobs/templates/2019.2.0-heat-cicd-queens-contrail41-sl.yml
@@ -43,7 +43,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/2019.2.0-heat-cicd-queens-dvr-sl.yml b/jobs/templates/2019.2.0-heat-cicd-queens-dvr-sl.yml
index b9cdba1..bcfdbd7 100644
--- a/jobs/templates/2019.2.0-heat-cicd-queens-dvr-sl.yml
+++ b/jobs/templates/2019.2.0-heat-cicd-queens-dvr-sl.yml
@@ -43,7 +43,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/bm-cicd-pike-ovs-maas.yml b/jobs/templates/bm-cicd-pike-ovs-maas.yml
index 0c59df9..13a0a20 100644
--- a/jobs/templates/bm-cicd-pike-ovs-maas.yml
+++ b/jobs/templates/bm-cicd-pike-ovs-maas.yml
@@ -44,7 +44,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/bm-cicd-queens-ovs-maas.yml b/jobs/templates/bm-cicd-queens-ovs-maas.yml
index 61dd249..9f35ee7 100644
--- a/jobs/templates/bm-cicd-queens-ovs-maas.yml
+++ b/jobs/templates/bm-cicd-queens-ovs-maas.yml
@@ -43,7 +43,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/cookied-cicd-queens-dvr-sl-heat.yml b/jobs/templates/cookied-cicd-queens-dvr-sl-heat.yml
index fcfbfea..ff44cd3 100644
--- a/jobs/templates/cookied-cicd-queens-dvr-sl-heat.yml
+++ b/jobs/templates/cookied-cicd-queens-dvr-sl-heat.yml
@@ -43,7 +43,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/deploy-released.yml b/jobs/templates/deploy-released.yml
index 4ddb1f4..969e21f 100644
--- a/jobs/templates/deploy-released.yml
+++ b/jobs/templates/deploy-released.yml
@@ -9,7 +9,7 @@
     name: deploy-released
     parameters:
     - string:
-        default: sre-qa-ci-eu
+        default: sre-qa-team-ci
         description: ''
         name: OS_CREDENTIALS
         trim: 'false'
diff --git a/jobs/templates/heat-bm-cicd-pike-contrail-sl.yml b/jobs/templates/heat-bm-cicd-pike-contrail-sl.yml
index 2ea8bc5..69097ca 100644
--- a/jobs/templates/heat-bm-cicd-pike-contrail-sl.yml
+++ b/jobs/templates/heat-bm-cicd-pike-contrail-sl.yml
@@ -45,7 +45,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/heat-bm-cicd-queens-contrail-sl.yml b/jobs/templates/heat-bm-cicd-queens-contrail-sl.yml
index b2c53bc..833250d 100644
--- a/jobs/templates/heat-bm-cicd-queens-contrail-sl.yml
+++ b/jobs/templates/heat-bm-cicd-queens-contrail-sl.yml
@@ -46,7 +46,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/heat-cicd-pike-dvr-sl.yml b/jobs/templates/heat-cicd-pike-dvr-sl.yml
index dad3390..2c911e6 100644
--- a/jobs/templates/heat-cicd-pike-dvr-sl.yml
+++ b/jobs/templates/heat-cicd-pike-dvr-sl.yml
@@ -50,7 +50,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: '/home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2'
+        default: '/home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2'
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/heat-cicd-queens-contrail41-sl.yml b/jobs/templates/heat-cicd-queens-contrail41-sl.yml
index 99f03e4..6132cac 100644
--- a/jobs/templates/heat-cicd-queens-contrail41-sl.yml
+++ b/jobs/templates/heat-cicd-queens-contrail41-sl.yml
@@ -45,7 +45,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/heat-cicd-queens-dvr-sl.yml b/jobs/templates/heat-cicd-queens-dvr-sl.yml
index 3c5ce0f..d632805 100644
--- a/jobs/templates/heat-cicd-queens-dvr-sl.yml
+++ b/jobs/templates/heat-cicd-queens-dvr-sl.yml
@@ -44,7 +44,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/maintenance-heat-cicd-pike-dvr-sl.yml b/jobs/templates/maintenance-heat-cicd-pike-dvr-sl.yml
index 1ec57b0..b0cfe1b 100644
--- a/jobs/templates/maintenance-heat-cicd-pike-dvr-sl.yml
+++ b/jobs/templates/maintenance-heat-cicd-pike-dvr-sl.yml
@@ -43,7 +43,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/released-bm-pike-ovs.yml b/jobs/templates/released-bm-pike-ovs.yml
index 6828da1..1adce4c 100644
--- a/jobs/templates/released-bm-pike-ovs.yml
+++ b/jobs/templates/released-bm-pike-ovs.yml
@@ -43,7 +43,7 @@
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml b/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml
index 8fbed34..1965854 100644
--- a/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml
+++ b/jobs/templates/released-heat-cicd-pike-contrail41-sl.yml
@@ -38,12 +38,12 @@
         name: MCP_VERSION
         trim: 'false'
     - string:
-        default: jenkins-master-si
+        default: sre-team-infra
         description: ''
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/jobs/templates/released-heat-cicd-pike-dvr-sl.yml b/jobs/templates/released-heat-cicd-pike-dvr-sl.yml
index 0eef0b2..9992972 100644
--- a/jobs/templates/released-heat-cicd-pike-dvr-sl.yml
+++ b/jobs/templates/released-heat-cicd-pike-dvr-sl.yml
@@ -38,12 +38,12 @@
         name: MCP_VERSION
         trim: 'false'
     - string:
-        default: jenkins-master-si
+        default: sre-team-infra
         description: ''
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         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 bc012dd..6ddc03e 100644
--- a/jobs/templates/released-heat-cicd-queens-dvr-sl.yml
+++ b/jobs/templates/released-heat-cicd-queens-dvr-sl.yml
@@ -38,12 +38,12 @@
         name: MCP_VERSION
         trim: 'false'
     - string:
-        default: jenkins-master-si
+        default: sre-team-infra
         description: ''
         name: NODE_NAME
         trim: 'false'
     - string:
-        default: /home/jenkins/images/ubuntu-16-04-x64-mcp${{MCP_VERSION}}.qcow2
+        default: /home/jenkins/images/ubuntu-16-04-x64-mcp2019.2.0.qcow2
         description: ''
         name: MCP_IMAGE_PATH1604
         trim: 'false'
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index 9f042f0..ce5e7f2 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -201,8 +201,8 @@
 
 def swarm_bootstrap_salt_cluster_devops() {
         def common = new com.mirantis.mk.Common()
-        def cookiecutter_template_commit = env.COOKIECUTTER_TEMPLATE_COMMIT ?: is_released_version(env.MCP_VERSION) ? "release/${env.MCP_VERSION}" : 'master'
-        def salt_models_system_commit = env.SALT_MODELS_SYSTEM_COMMIT ?: "release/${env.MCP_VERSION}"
+        def cookiecutter_template_commit = env.COOKIECUTTER_TEMPLATE_COMMIT ?: is_released_version(env.MCP_VERSION) ? "refs/tags/${env.MCP_VERSION}" : 'master'
+        def salt_models_system_commit = env.SALT_MODELS_SYSTEM_COMMIT ?: "refs/tags/${env.MCP_VERSION}"
         def jenkins_pipelines_branch = env.JENKINS_PIPELINE_BRANCH ?: ''
         def tcp_qa_refs = env.TCP_QA_REFS ?: ''
         def mk_pipelines_ref = env.MK_PIPELINES_REF ?: ''
@@ -257,8 +257,8 @@
 def swarm_bootstrap_salt_cluster_heat(String jenkins_slave_node_name) {
         // jenkins_slave_node_name
         def common = new com.mirantis.mk.Common()
-        def cookiecutter_template_commit = env.COOKIECUTTER_TEMPLATE_COMMIT ?: "release/${env.MCP_VERSION}"
-        def salt_models_system_commit = env.SALT_MODELS_SYSTEM_COMMIT ?: "release/${env.MCP_VERSION}"
+        def cookiecutter_template_commit = env.COOKIECUTTER_TEMPLATE_COMMIT ?: "refs/tags/${env.MCP_VERSION}"
+        def salt_models_system_commit = env.SALT_MODELS_SYSTEM_COMMIT ?: "refs/tags/${env.MCP_VERSION}"
         def mcp_common_scripts_refs = env.MCP_COMMON_SCRIPTS_REFS ?: ''
         def tcp_qa_refs = env.TCP_QA_REFS ?: ''
         def mk_pipelines_ref = env.MK_PIPELINES_REF ?: ''
@@ -428,8 +428,8 @@
         println("IPV4_NET_TENANT=" + IPV4_NET_TENANT)
         println("IPV4_NET_EXTERNAL=" + IPV4_NET_EXTERNAL)
 
-        def cookiecuttertemplate_commit = env.COOKIECUTTER_TEMPLATE_COMMIT ?: is_released_version(env.MCP_VERSION) ? "release/${env.MCP_VERSION}" : 'master'
-        def saltmodels_system_commit = env.SALT_MODELS_SYSTEM_COMMIT ?: "release/${env.MCP_VERSION}"
+        def cookiecuttertemplate_commit = env.COOKIECUTTER_TEMPLATE_COMMIT ?: is_released_version(env.MCP_VERSION) ? "refs/tags/${env.MCP_VERSION}" : 'master'
+        def saltmodels_system_commit = env.SALT_MODELS_SYSTEM_COMMIT ?: "refs/tags/${env.MCP_VERSION}"
         def tcp_qa_refs = env.TCP_QA_REFS ?: ''
         def environment_template_ref_change = env.ENVIRONMENT_TEMPLATE_REF_CHANGE ?: ''
         def cookiecutter_ref_change = env.COOKIECUTTER_REF_CHANGE ?: ''
@@ -480,11 +480,11 @@
 
         def parameters = [
                 string(name: 'CLUSTER_NAME', value: "${LAB_CONFIG_NAME}"),
-                string(name: 'MODEL_URL', value: "http://172.19.112.216:8098/${LAB_CONFIG_NAME}.git"),
+                string(name: 'MODEL_URL', value: "http://sre-ci.scc.mirantis.net:8098/${LAB_CONFIG_NAME}.git"),
                 string(name: 'MODEL_URL_OBJECT_TYPE', value: "git"),
                 booleanParam(name: 'DOWNLOAD_CONFIG_DRIVE', value: true),
                 string(name: 'MCP_VERSION', value: "${MCP_VERSION}"),
-                string(name: 'COMMON_SCRIPTS_COMMIT', value: "release/${env.MCP_VERSION}"),
+                string(name: 'COMMON_SCRIPTS_COMMIT', value: "refs/tags/${env.MCP_VERSION}"),
                 string(name: 'NODE_NAME', value: "${NODE_NAME}"),
                 string(name: 'CONFIG_DRIVE_ISO_NAME', value: "${CFG01_CONFIG_IMAGE_NAME}"),
                 string(name: 'SALT_MASTER_DEPLOY_IP', value: SALT_MASTER_IP),
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index 20b1062..2026685 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -485,7 +485,9 @@
     sed -i 's/cluster_domain: .*/cluster_domain: {{ DOMAIN_NAME }}/g' {{ CLUSTER_CONTEXT_PATH }}
     sed -i 's/mcp_version:.*/mcp_version: {{ REPOSITORY_SUITE }}/g' {{ CLUSTER_CONTEXT_PATH }}
     {%- if JENKINS_PIPELINE_BRANCH != '' %}
-    sed -i 's/jenkins_pipelines_branch: .*/jenkins_pipelines_branch: release\/proposed\/{{ REPOSITORY_SUITE }}/g' {{ CLUSTER_CONTEXT_PATH }}
+    # Escape / with \/
+    escaped_branch=$(echo {{ JENKINS_PIPELINE_BRANCH }} | sed "s/\//\\\\\//g")
+    sed -i "s/jenkins_pipelines_branch: .*/jenkins_pipelines_branch: $escaped_branch/g" {{ CLUSTER_CONTEXT_PATH }}
     {%- endif %}
     {%- if CONTROL_VLAN  %}
     sed -i 's/control_vlan: .*/control_vlan: {{ CONTROL_VLAN }}/g' {{ CLUSTER_CONTEXT_PATH }}