Fix offline deploy
Change-Id: I0fd7418ad70985803a8c386c29dc379e8ad8ef1a
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index b14f868..7fa9b28 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -108,7 +108,6 @@
#HOME=/root git config --global http.sslCAInfo /root/.git_trusted_certs.pem;
HOME=/root git config --global user.email "mcp-integration-qa@example.com";
HOME=/root git config --global user.name "MCP Integration QA";
- HOME=/root git config submodule."classes/system".url "{{ SALT_MODELS_SYSTEM_REPOSITORY }}";
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
@@ -122,27 +121,29 @@
cmd: |
set -e;
#ssh-keyscan -H github.com >> ~/.ssh/known_hosts;
- export GIT_SSL_NO_VERIFY=true; git clone -b {{ SALT_MODELS_BRANCH }} --recurse-submodules {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
- pushd /srv/salt/reclass && \
+ export GIT_SSL_NO_VERIFY=true; git clone -b {{ SALT_MODELS_BRANCH }} {{ SALT_MODELS_REPOSITORY }} /srv/salt/reclass;
+ pushd /srv/salt/reclass;
+ git config submodule."classes/system".url "{{ SALT_MODELS_SYSTEM_REPOSITORY }}";
+ git submodule update --init --recursive;
{%- if SALT_MODELS_REF_CHANGE != '' %}
{%- for item in SALT_MODELS_REF_CHANGE.split(" ") %}
- git fetch {{ SALT_MODELS_REPOSITORY }} {{ item }} && git cherry-pick FETCH_HEAD && \
+ git fetch {{ SALT_MODELS_REPOSITORY }} {{ item }} && git cherry-pick FETCH_HEAD;
{%- endfor %}
{%- elif SALT_MODELS_COMMIT != 'master' %}
- git checkout {{ SALT_MODELS_COMMIT }} && \
+ git checkout {{ SALT_MODELS_COMMIT }};
{%- endif %}
{%- if SALT_MODELS_SYSTEM_COMMIT != '' %}
- pushd classes/system/ && \
- git checkout {{ SALT_MODELS_SYSTEM_COMMIT }} && \
- popd && \
+ 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 && \
+ git fetch {{ SALT_MODELS_SYSTEM_REPOSITORY }} {{ item }} && git cherry-pick FETCH_HEAD;
{%- endfor %}
- popd && \
+ popd;
{%- else %}
- git submodule update --init --recursive && \
+ git submodule update --init --recursive;
{%- endif %}
popd;
mkdir -p /srv/salt/reclass/classes/service;