Run tox in venv in case of building images
tox depends on virtualenv, when it's installed using pip - it tries to upgrade virtualenv, and then fails. Change-Id: Ic9566778f87f8b81563ed012e651cef50d1baa38
This commit is contained in:
parent
872a0552f0
commit
f3ba8d5f23
@ -36,6 +36,14 @@
|
|||||||
- python-virtualenv
|
- python-virtualenv
|
||||||
- python-wheel
|
- python-wheel
|
||||||
|
|
||||||
|
- name: Install virtualenv on Debian systems
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- virtualenv
|
||||||
|
become: true
|
||||||
|
when:
|
||||||
|
ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: Ensure latest pip is installed
|
- name: Ensure latest pip is installed
|
||||||
become: true
|
become: true
|
||||||
pip:
|
pip:
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
- name: Ensure tox is installed
|
- name: Ensure tox is installed
|
||||||
pip:
|
pip:
|
||||||
name: tox
|
name: tox
|
||||||
|
virtualenv: "{{ ansible_env.HOME }}/tox-venv"
|
||||||
when: need_build_image
|
when: need_build_image
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
@ -191,6 +192,7 @@
|
|||||||
TAG: "{{ build_image_tag }}"
|
TAG: "{{ build_image_tag }}"
|
||||||
KOLLA_SRC_DIR: "{{ ansible_env.HOME }}/src/opendev.org/openstack/kolla"
|
KOLLA_SRC_DIR: "{{ ansible_env.HOME }}/src/opendev.org/openstack/kolla"
|
||||||
ACTION: "{{ scenario }}"
|
ACTION: "{{ scenario }}"
|
||||||
|
TOX_VENV: "{{ ansible_env.HOME }}/tox-venv"
|
||||||
UPPER_CONSTRAINTS: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
|
UPPER_CONSTRAINTS: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
|
||||||
|
|
||||||
# At this point we have generated all necessary configuration, and are
|
# At this point we have generated all necessary configuration, and are
|
||||||
|
@ -150,7 +150,7 @@ function prepare_images {
|
|||||||
fi
|
fi
|
||||||
sudo docker run -d -p 4000:5000 --restart=always -v /opt/kolla_registry/:/var/lib/registry --name registry registry:2
|
sudo docker run -d -p 4000:5000 --restart=always -v /opt/kolla_registry/:/var/lib/registry --name registry registry:2
|
||||||
pushd "${KOLLA_SRC_DIR}"
|
pushd "${KOLLA_SRC_DIR}"
|
||||||
sudo tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
|
sudo $TOX_VENV/bin/tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user