Use system reclass review for build

Change-Id: Ib2c207fb97ed7bbc948a9154a1e64e154bc7c3bc
Reviewed-on: https://review.gerrithub.io/375763
Reviewed-by: Dennis Dmitriev <dis.xcom@gmail.com>
Tested-by: Dennis Dmitriev <dis.xcom@gmail.com>
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index 0351418..1fc1ab2 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -5,7 +5,9 @@
 {# Reference to a patch that should be applied to the model if required, for example: export SALT_MODELS_REF_CHANGE=refs/changes/19/7219/12 #}
 {% set SALT_MODELS_REF_CHANGE = os_env('SALT_MODELS_REF_CHANGE', '') %}
 {# Pin to a specified commit in salt-models/reclass-system #}
+{% set SALT_MODELS_SYSTEM_REPOSITORY = os_env('SALT_MODELS_SYSTEM_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/reclass-system') %}
 {% set SALT_MODELS_SYSTEM_COMMIT = os_env('SALT_MODELS_SYSTEM_COMMIT','') %}
+{% set SALT_MODELS_SYSTEM_REF_CHANGE = os_env('SALT_MODELS_SYSTEM_REF_CHANGE','') %}
 
 {% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
 
@@ -94,6 +96,12 @@
     pushd classes/system/ && \
     git checkout {{ SALT_MODELS_SYSTEM_COMMIT }} && \
     popd && \
+    {%- elif SALT_MODELS_SYSTEM_REF_CHANGE != '' -%}
+    pushd classes/system/ && \
+    {%- for item in SALT_MODELS_SYSTEM_REF_CHANGE.split(" ") %}
+    git fetch {{ SALT_MODELS_SYSTEM_REPOSITORY }} {{ item }} && git cherry-pick FETCH_HEAD && \
+    {%- endfor %}
+    popd && \
     {%- else %}
     git submodule update --init --recursive && \
     {%- endif %}