diff options
-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 |