From b7ea9c81b42689e8e83f6d9c27e1f665459bc93c Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Thu, 22 Dec 2016 19:34:27 +1100 Subject: [PATCH] Teach run-tox-api-ref.sh to install requirements with constraints In trying to add constraints support to os-api-ref we hit a case where installing os-api-ref with this script will also update requirements. If a requirement isn't blocked in thw gate *or* os-api-ref hasn't merged the proposal-bit's update this can lead to failures. This change addresses that by installing openstack-requirements and removing os-api-ref from upper-constraints.txt. Then when it installs os-api-ref the version from git is appropriate BUT all requirements are also constrained. Note: This assumes running in the gate and that the git setup has copied the upper-constraints.txt into a local file and set the UPPER_CONSTRAINTS_FILE appropriately. The new commands will fail and cause job failures if these pre-conditions are not met. Change-Id: Ic9b49dbd2b9b8c991fa6d21545460ce015bcc320 Needed-By: I7ad1c2afda29b095ff3d53db5eec7101f8816c2e --- jenkins/scripts/run-tox-api-ref.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jenkins/scripts/run-tox-api-ref.sh b/jenkins/scripts/run-tox-api-ref.sh index 280b741c4b..582f7fda26 100644 --- a/jenkins/scripts/run-tox-api-ref.sh +++ b/jenkins/scripts/run-tox-api-ref.sh @@ -15,10 +15,18 @@ api_ref_dir=${1:-./os-api-ref} script_path=/usr/local/jenkins/slave_scripts +# NOTE(tonyb): This assumes running in the gate and that the git setup has +# copied the upper-constraints.txt into a local file and set the +# UPPER_CONSTRAINTS_FILE appropriately. The new commands will fail and cause +# job failures if these pre-conditions are not met. cat <> tox.ini [testenv:api-ref-src] +deps = + {[testenv]deps} + openstack-requirements commands = - pip install -U $api_ref_dir + edit-constraints {env:UPPER_CONSTRAINTS_FILE:} -- os-api-ref + pip install -c {env:UPPER_CONSTRAINTS_FILE:} $api_ref_dir sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html EOF