Faster venv-ansible-playbook.sh
If running a playbook more than once, there's no need to re-bootstrap the virtual environment. Assume if the verified crio directory already exists, it should be used (after re-asserting hashes of requirements). Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
parent
d153815f74
commit
29c4d890c8
1 changed files with 22 additions and 20 deletions
|
@ -56,6 +56,8 @@ echo
|
|||
(
|
||||
set -x
|
||||
cd "$WORKSPACE"
|
||||
# When running more than once, make it fast by skipping the bootstrap
|
||||
if [ ! -d "./.cri-o_venv" ]; then
|
||||
# N/B: local system's virtualenv binary - uncontrolled version fixed below
|
||||
virtualenv --no-site-packages --python=python2.7 ./.venvbootstrap
|
||||
# Set up paths to install/operate out of $WORKSPACE/.venvbootstrap
|
||||
|
@ -76,7 +78,7 @@ echo
|
|||
./.venvbootstrap/bin/virtualenv --no-site-packages --python=python2.7 ./.cri-o_venv
|
||||
# Exit untrusted virtualenv
|
||||
deactivate
|
||||
|
||||
fi
|
||||
# Enter trusted virtualenv
|
||||
source ./.cri-o_venv/bin/activate
|
||||
# Re-install from cache
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue