diff options
author | Zuul <zuul@review.opendev.org> | 2020-05-16 15:18:55 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-05-16 15:18:55 +0000 |
commit | ea1d3b7d72268d906ed981d5421ee2b218332aab (patch) | |
tree | 927f059d61abbfe7b9eacee29758a5ea37125f31 | |
parent | a3d960eedb58dd94719d46b78b96970cebbb8c6d (diff) | |
parent | a0844c4b56fc8451313e37194aac8be2fd647914 (diff) | |
download | zuul-ea1d3b7d72268d906ed981d5421ee2b218332aab.tar.gz |
Merge "Retry nodeenv creation"
-rwxr-xr-x | tools/pip.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/pip.sh b/tools/pip.sh index 469d119eb..7db784690 100755 --- a/tools/pip.sh +++ b/tools/pip.sh @@ -23,7 +23,15 @@ then pip install nodeenv # Initialize nodeenv and tell it to re-use the currently active virtualenv # TODO(jeblair): remove node version pin. upath 1.0.4 objects to node >9. - nodeenv --python-virtualenv -n 10.16.0 + attempts=0 + until nodeenv --python-virtualenv -n 10.16.0; do + ((attempts++)) + if [[ $attempts > 2 ]] + then + echo "Failed creating nodeenv" + exit 1 + fi + done # Use -g because inside of the virtualenv '-g' means 'install into the' # virtualenv - as opposed to installing into the local node_modules. # Avoid writing a package-lock.json file since we don't use it. |