From 83de96e250c93cb20dfadd9b4ff72647d7a70f55 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 23 Feb 2018 22:33:44 +0000 Subject: [PATCH] Use OpenStack-Infra mirrors for tests When running in nodepool, use the OpenStack-Infra mirrors. Change-Id: I9ee3d4a8a296a7cb0ae0baf271dd3a06bf4e3874 (cherry picked from commit db8bd2a79b8f83e799ccf4500e4ff4b06957f65a) --- common-tasks/test-set-nodepool-vars.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/common-tasks/test-set-nodepool-vars.yml b/common-tasks/test-set-nodepool-vars.yml index 5f2ee243..2068d96e 100644 --- a/common-tasks/test-set-nodepool-vars.yml +++ b/common-tasks/test-set-nodepool-vars.yml @@ -116,3 +116,24 @@ openstack_hosts_enable_yum_fastestmirror: no when: - nodepool.stat.exists | bool + +- name: Discover the OpenStack-Infra pypi/wheel mirror + shell: | + source /etc/ci/mirror_info.sh + echo ${NODEPOOL_PYPI_MIRROR} + echo ${NODEPOOL_WHEEL_MIRROR} + args: + executable: /bin/bash + register: _pypi_wheel_mirror + delegate_to: localhost + when: + - nodepool.stat.exists | bool + +- name: Enable the use of the OpenStack-Infra pypi/wheel mirror + set_fact: + pip_default_index: "{{ _pypi_wheel_mirror.stdout_lines[0] }}" + pip_links: + - name: "infra_wheel_mirror" + link: "{{ _pypi_wheel_mirror.stdout_lines[1] }}" + when: + - nodepool.stat.exists | bool