From 7a47c2ff8db7b427798893c6ba253e683f40b569 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 7 Oct 2013 20:45:08 +0000 Subject: [PATCH] Conditionally override PyPI for reqs integration * devstack-vm-gate-wrap.sh: In preparation for performing integration testing of the openstack/requirements global list on changes to requirements and jeepyb/pypi-mirror, allow the combination of ZUUL_PROJECT and DEVSTACK_GATE_REQS_INTEGRATION envvars to determine whether to override the PyPI URL and use the openstack mirror. Change-Id: I21fe53b7a17594f1d7f20f1407d0c19d11ad11be --- devstack-vm-gate-wrap.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 7bf320c7..ec65dd95 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -197,23 +197,26 @@ function setup_host { sudo usermod -a -G vz stack fi - cat < /tmp/pydistutils.cfg + if [ "$DEVSTACK_GATE_REQS_INTEGRATION" -eq "0" \ + -o "$ZUUL_PROJECT" != "openstack/requirements" ]; then + cat < /tmp/pydistutils.cfg [easy_install] index_url = http://pypi.openstack.org/openstack EOF - cat < /tmp/pip.conf + cat < /tmp/pip.conf [global] index-url = http://pypi.openstack.org/openstack EOF - cp /tmp/pydistutils.cfg ~/.pydistutils.cfg - cp /tmp/pydistutils.cfg ~stack/.pydistutils.cfg - sudo cp /tmp/pydistutils.cfg ~root/.pydistutils.cfg - mkdir -p ~/.pip - mkdir -p ~stack/.pip - sudo -u root mkdir -p ~root/.pip - cp /tmp/pip.conf ~/.pip/pip.conf - cp /tmp/pip.conf ~stack/.pip/pip.conf - sudo -u root cp /tmp/pip.conf ~root/.pip/pip.conf + cp /tmp/pydistutils.cfg ~/.pydistutils.cfg + cp /tmp/pydistutils.cfg ~stack/.pydistutils.cfg + sudo cp /tmp/pydistutils.cfg ~root/.pydistutils.cfg + mkdir -p ~/.pip + mkdir -p ~stack/.pip + sudo -u root mkdir -p ~root/.pip + cp /tmp/pip.conf ~/.pip/pip.conf + cp /tmp/pip.conf ~stack/.pip/pip.conf + sudo -u root cp /tmp/pip.conf ~root/.pip/pip.conf + fi # Disable detailed logging as we return to the main script set +o xtrace @@ -461,6 +464,9 @@ export DEVSTACK_GATE_TEMPEST_TESTR_FULL=${DEVSTACK_GATE_TEMPEST_TESTR_FULL:-0} # Set to 1 to run all tempest tests export DEVSTACK_GATE_TEMPEST_ALL=${DEVSTACK_GATE_TEMPEST_ALL:-0} +# Set to 1 if running the openstack/requirements integration test +export DEVSTACK_GATE_REQS_INTEGRATION=${DEVSTACK_GATE_REQS_INTEGRATION:-0} + if ! function_exists "gate_hook"; then # the command we use to run the gate function gate_hook {