From f4e8e7f82a94379bc50779e9027876bce23d3a90 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 29 May 2018 12:42:30 +0100 Subject: [PATCH] Use upper constraints when installing ARA Currently the installation of ARA does not apply the same pip options (including constraints, proxy settings, etc) as the ansible bootstrap. This may result in unexpected side-effects. To ensure that we're keeping things consistent, we apply the same pip options as those used for the Ansible bootstrap. Depends-On: https://review.openstack.org/570601 Depends-On: https://review.openstack.org/570868 Change-Id: I5f20a130032e1b65dc78828344345515975da4dc --- scripts/gate-check-commit.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 00a79013b1..9c10a0ea19 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -104,10 +104,14 @@ source "${OSA_CLONE_DIR}/scripts/bootstrap-ansible.sh" ARA_SRC_HOME="${HOME}/src/git.openstack.org/openstack/ara" if [[ -d "${ARA_SRC_HOME}" ]]; then # This installs from a git checkout - /opt/ansible-runtime/bin/pip install ${ARA_SRC_HOME} "${ANSIBLE_PACKAGE:-ansible}" + # PIP_COMMAND and PIP_OPTS are exported by the bootstrap-ansible script. + # PIP_OPTS contains the whole set of constraints that need to be applied. + ${PIP_COMMAND} install --isolated ${PIP_OPTS} ${ARA_SRC_HOME} "${ANSIBLE_PACKAGE:-ansible}" else # This installs from pypi - /opt/ansible-runtime/bin/pip install ara "${ANSIBLE_PACKAGE:-ansible}" + # PIP_COMMAND and PIP_OPTS are exported by the bootstrap-ansible script. + # PIP_OPTS contains the whole set of constraints that need to be applied. + ${PIP_COMMAND} install --isolated ${PIP_OPTS} ara "${ANSIBLE_PACKAGE:-ansible}" fi # Dynamically retrieve the location of the ARA callback so we are able to find # it on both py2 and py3