Activate virtualenv for model generation
In the cookiecutter-templates/requirements.txt
is used a requirement from pull request on github.com.
Pip 8.1.1 which is installed on cfg01 by default, cannot
correctly checkout the pull request.
- Create and activate virtualenv in the
MACRO_GENERATE_COOKIECUTTER_MODEL()
- Update pip to the latest version
Change-Id: I9e802983c42671986ba835a74aac6114298abb65
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index bc30a10..bfa601a 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -380,6 +380,11 @@
set -e;
set -x;
sudo apt-get install python-setuptools -y
+
+ [[ -d /root/venv-reclass-tools ]] || virtualenv /root/venv-reclass-tools;
+ . /root/venv-reclass-tools/bin/activate;
+ pip install -U pip
+
pip install cookiecutter
chmod 0600 /tmp/{{ COOKIECUTTER_TEMPLATES_REPOSITORY_KEY_PATH | basename }}