diff options
author | Markos Chandras <mchandras@suse.de> | 2018-04-06 09:16:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-04-06 09:16:40 +0000 |
commit | 60f887c297319e4d35924dff37f333f3cdbe7ca0 (patch) | |
tree | e71f18abc3970ccaf3b84885d01925374200ac28 | |
parent | 4e8278f203675b8cf629ecceb625c21ff7efa3bc (diff) | |
parent | 57cdaf4fb8c33813c9c85747ed6ff1b8dbdf59ff (diff) |
Merge "xci: bifrost: Use 'sudo' to install dependencies for bifrost jobs"
-rwxr-xr-x | xci/infra/bifrost/scripts/bifrost-provision.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xci/infra/bifrost/scripts/bifrost-provision.sh b/xci/infra/bifrost/scripts/bifrost-provision.sh index 2b849e34..95854e90 100755 --- a/xci/infra/bifrost/scripts/bifrost-provision.sh +++ b/xci/infra/bifrost/scripts/bifrost-provision.sh @@ -100,8 +100,10 @@ if [[ -e ${XCI_PATH}/deployment_image.qcow2 ]]; then sudo mv ${XCI_PATH}/deployment_image.qcow2* /httpboot/ fi -# Install missing dependencies -pip install -q --upgrade -r "$(dirname $0)/../requirements.txt" +# Install missing dependencies. Use sudo since for bifrost jobs +# the venv is not ready yet. +[[ -n ${VIRTUAL_ENV} ]] && _sudo="" || sudo="sudo -H -E" +${_sudo} pip install -q --upgrade -r "$(dirname $0)/../requirements.txt" # Change working directory cd $BIFROST_HOME/playbooks |