Fix checkout to salt models commit
Change-Id: I70e9c89a0ee2a9729cdf4e85bb9d1655d8484308
Reviewed-on: https://review.gerrithub.io/364426
Reviewed-by: <apanchenko@mirantis.com>
Reviewed-by: Tatyanka Leontovich <tleontovich@mirantis.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/templates/mk24_lab_ovs_dvr_vlan_bm/salt.yaml b/tcp_tests/templates/mk24_lab_ovs_dvr_vlan_bm/salt.yaml
index 2cc6997..702ee39 100644
--- a/tcp_tests/templates/mk24_lab_ovs_dvr_vlan_bm/salt.yaml
+++ b/tcp_tests/templates/mk24_lab_ovs_dvr_vlan_bm/salt.yaml
@@ -2,6 +2,7 @@
{% from 'mk24_lab_ovs_dvr_vlan_bm/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/qa') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
{% set SALT_MODELS_SYSTEM_COMMIT = os_env('SALT_MODELS_SYSTEM_COMMIT','') %}
@@ -85,7 +86,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
cd /srv/salt/reclass/classes/system;
git checkout {{ SALT_MODELS_SYSTEM_COMMIT }};
diff --git a/tcp_tests/templates/physical_mcp11_dvr/salt.yaml b/tcp_tests/templates/physical_mcp11_dvr/salt.yaml
index beebaa8..7c1e6ee 100644
--- a/tcp_tests/templates/physical_mcp11_dvr/salt.yaml
+++ b/tcp_tests/templates/physical_mcp11_dvr/salt.yaml
@@ -2,6 +2,7 @@
{% from 'physical_mcp11_dvr/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-baremetal-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -84,8 +85,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
-
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
# Replace firstly to an intermediate value to avoid intersection between
diff --git a/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml b/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml
index 95c17ee..faaf014 100644
--- a/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml
+++ b/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml
@@ -2,6 +2,7 @@
{% from 'physical_mcp11_ovs_dpdk/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-baremetal-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
{% set SALT_MODELS_SYSTEM_COMMIT = os_env('SALT_MODELS_SYSTEM_COMMIT','') %}
@@ -85,7 +86,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
cd /srv/salt/reclass/classes/system;
git checkout {{ SALT_MODELS_SYSTEM_COMMIT }};
diff --git a/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml b/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml
index 35e7bf4..106d9e9 100644
--- a/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-ocata-dvr/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp-ocata-dvr/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
diff --git a/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml b/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml
index a1037d7..4250564 100644
--- a/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp-ocata-ovs/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
diff --git a/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml b/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml
index 7acb986..e99b83e 100644
--- a/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp10-contrail/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp10-contrail/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
diff --git a/tcp_tests/templates/virtual-mcp11-dvr/salt.yaml b/tcp_tests/templates/virtual-mcp11-dvr/salt.yaml
index 6d1bc17..c784ed0 100644
--- a/tcp_tests/templates/virtual-mcp11-dvr/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-dvr/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp11-dvr/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
diff --git a/tcp_tests/templates/virtual-mcp11-k8s-calico/salt.yaml b/tcp_tests/templates/virtual-mcp11-k8s-calico/salt.yaml
index 36bcb2a..a024e90 100644
--- a/tcp_tests/templates/virtual-mcp11-k8s-calico/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-k8s-calico/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp11-k8s-calico/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -60,7 +61,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
# Replace firstly to an intermediate value to avoid intersection between
diff --git a/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml b/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml
index d9011bb..3e3e3e1 100644
--- a/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-k8s-contrail/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp11-k8s-contrail/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -60,7 +61,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
# Replace firstly to an intermediate value to avoid intersection between
diff --git a/tcp_tests/templates/virtual-mcp11-ovs-dpdk/salt.yaml b/tcp_tests/templates/virtual-mcp11-ovs-dpdk/salt.yaml
index 8d71e60..3020b1d 100644
--- a/tcp_tests/templates/virtual-mcp11-ovs-dpdk/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-ovs-dpdk/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp11-ovs-dpdk/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
diff --git a/tcp_tests/templates/virtual-mcp11-ovs.new/salt.yaml b/tcp_tests/templates/virtual-mcp11-ovs.new/salt.yaml
index 2518fba..4a7a73a 100644
--- a/tcp_tests/templates/virtual-mcp11-ovs.new/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-ovs.new/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp11-ovs/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;
diff --git a/tcp_tests/templates/virtual-mcp11-ovs/salt.yaml b/tcp_tests/templates/virtual-mcp11-ovs/salt.yaml
index 2518fba..4a7a73a 100644
--- a/tcp_tests/templates/virtual-mcp11-ovs/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp11-ovs/salt.yaml
@@ -2,6 +2,7 @@
{% from 'virtual-mcp11-ovs/underlay.yaml' import REPOSITORY_SUITE with context %}
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
+{% set SALT_MODELS_BRANCH = os_env('SALT_MODELS_BRANCH','master') %}
{% set SALT_MODELS_COMMIT = os_env('SALT_MODELS_COMMIT','master') %}
# Address pools for reclass cluster model are taken in the following order:
@@ -93,7 +94,8 @@
- description: Clone reclass models with submodules
cmd: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- git clone -b {{ SALT_MODELS_COMMIT }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass && git checkout {{ SALT_MODELS_COMMIT }} && popd;
mkdir -p /srv/salt/reclass/classes/service;