From 29ab6ae74323268190ec5da2f5e7a6aa00fba9e9 Mon Sep 17 00:00:00 2001 From: Julie Pichon Date: Tue, 12 Jun 2018 10:12:04 +0100 Subject: Fix sphinx docs job on stable/pike It looks like the CLIENT_NAME env variable is not passed onto the script when running the tox job. Also include the fix from I35e9ede7103031ea3ea45e35d743e63059fb8d0b: build-openstack-sphinx-docs jobs fail on stable branches because the new pip version 10 changed a Warning into an Error: When calling "pip install" without any package name, the command now fails. tox_install.sh is being called during docs job without any package passed to pip. Note that this only affects stable/pike and older, so there is no patch in master to cherry-pick this from. Newer branches use a different way to set up the tox environment. Change-Id: I8b413799fd3d1c84a6a27222641267b4abad5651 --- tools/tox_install.sh | 6 ++++++ tox.ini | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/tox_install.sh b/tools/tox_install.sh index 43468e4..1a8e3e8 100755 --- a/tools/tox_install.sh +++ b/tools/tox_install.sh @@ -4,6 +4,7 @@ # with installing the client from source. We should remove the version pin in # the constraints file before applying it for from-source installation. +CLIENT_NAME=os-client-config CONSTRAINTS_FILE=$1 shift 1 @@ -26,5 +27,10 @@ pip install -c$localfile openstack-requirements # install will be constrained and we need to unconstrain it. edit-constraints $localfile -- $CLIENT_NAME +if [ -z "$*" ]; then + echo "No packages to be installed." + exit 0 +fi + pip install -c$localfile -U $* exit $? diff --git a/tox.ini b/tox.ini index dd2323a..ce0f3dd 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ passenv = ZUUL_CACHE_DIR install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages} setenv = VIRTUAL_ENV={envdir} - BRANCH_NAME=master + BRANCH_NAME=stable/pike CLIENT_NAME=os-client-config deps = -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' -- cgit v1.2.1