Skip to content

Commit 61f0b12

Browse files
committed
[CI] Do not set ansible_python_interpreter for Zuul
Zuul 4.6.0 does not allow to set ansible_python_interpreter. [1] Instead, with the current Zuul and Ansible, this should be automatically set to the proper python. This patch is required to restore the jobs which are ignored otherwise. [2] [3] Additionally, this change avoids the use of Ansible's pip module because it tries to use setuptools from the ansible_python_interpreter first even if another executable is set. [1] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023291.html [2] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023326.html [3] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023321.html Change-Id: Ib74eecd46617af51e23a3ccad664767b1bf6e04f
1 parent 32eb32f commit 61f0b12

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

.zuul.d/base.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
- ^tox\.ini$
111111
vars:
112112
publisher: false
113-
ansible_python_interpreter: python3
114113
extra-vars:
115114
kolla_logs_dir: "{{ zuul_output_dir }}/logs/kolla"
116115
kolla_build_logs_dir: "{{ kolla_logs_dir }}/build"

tests/playbooks/pre.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838
when:
3939
ansible_os_family == "Debian"
4040

41+
- name: Create virtualenv
42+
command: python3 -m virtualenv {{ virtualenv_path }} --python python3
43+
4144
- name: Install kolla
42-
pip:
43-
name: .
44-
chdir: "{{ zuul.project.src_dir }}"
45-
virtualenv: "{{ virtualenv_path }}"
46-
virtualenv_python: python3
45+
command: "{{ virtualenv_path }}/bin/python -m pip install {{ zuul.project.src_dir }}"
4746

4847
- name: Configure Docker repo for Debian/Ubuntu
4948
block:

tests/playbooks/publish.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
22
- hosts: all
3+
vars:
4+
# NOTE(yoctozepto): We need Docker SDK, the best source is Kolla venv.
5+
ansible_python_interpreter: "{{ virtualenv_path }}/bin/python"
36
tasks:
4-
- name: Ensure docker python SDK is installed
5-
become: true
6-
pip:
7-
name: "docker"
8-
state: present
9-
107
- name: List all containers
118
docker_host_info:
129
images: yes

0 commit comments

Comments
 (0)