diff --git a/playbooks/tox-py38/pre.yaml b/playbooks/tox-py38/pre.yaml deleted file mode 100644 index c3989daad..000000000 --- a/playbooks/tox-py38/pre.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- - -- hosts: all - roles: - - role: ../roles/python - vars: - python_command: python3.8 - python_version: "3.8" - python_release: "3.8.0" - pip_command: pip3.8 - pip_install_packages: - - virtualenv - - tox diff --git a/playbooks/unit/pre.yaml b/playbooks/unit/pre.yaml new file mode 100644 index 000000000..1418e2d5a --- /dev/null +++ b/playbooks/unit/pre.yaml @@ -0,0 +1,12 @@ +--- + +- hosts: all + roles: + - role: tobiko-compile-python + vars: + python_command: "python{{ python_version }}" + python_version: "{{ python_release.split('.')[:2] | join('.') }}" + pip_command: "pip{{ python_version }}" + pip_install_packages: + - virtualenv + - tox diff --git a/roles/python/.gitignore b/roles/tobiko-compile-python/.gitignore similarity index 100% rename from roles/python/.gitignore rename to roles/tobiko-compile-python/.gitignore diff --git a/roles/python/Vagrantfile b/roles/tobiko-compile-python/Vagrantfile similarity index 100% rename from roles/python/Vagrantfile rename to roles/tobiko-compile-python/Vagrantfile diff --git a/roles/python/ansible.cfg b/roles/tobiko-compile-python/ansible.cfg similarity index 100% rename from roles/python/ansible.cfg rename to roles/tobiko-compile-python/ansible.cfg diff --git a/roles/python/defaults/main.yaml b/roles/tobiko-compile-python/defaults/main.yaml similarity index 100% rename from roles/python/defaults/main.yaml rename to roles/tobiko-compile-python/defaults/main.yaml diff --git a/roles/python/resolv_conf.yaml b/roles/tobiko-compile-python/resolv_conf.yaml similarity index 100% rename from roles/python/resolv_conf.yaml rename to roles/tobiko-compile-python/resolv_conf.yaml diff --git a/roles/python/tasks/main.yaml b/roles/tobiko-compile-python/tasks/main.yaml similarity index 100% rename from roles/python/tasks/main.yaml rename to roles/tobiko-compile-python/tasks/main.yaml diff --git a/roles/python/tasks/setup_pip.yaml b/roles/tobiko-compile-python/tasks/setup_pip.yaml similarity index 100% rename from roles/python/tasks/setup_pip.yaml rename to roles/tobiko-compile-python/tasks/setup_pip.yaml diff --git a/roles/python/tasks/setup_python.yaml b/roles/tobiko-compile-python/tasks/setup_python.yaml similarity index 100% rename from roles/python/tasks/setup_python.yaml rename to roles/tobiko-compile-python/tasks/setup_python.yaml diff --git a/roles/python/tests/.gitignore b/roles/tobiko-compile-python/tests/.gitignore similarity index 100% rename from roles/python/tests/.gitignore rename to roles/tobiko-compile-python/tests/.gitignore diff --git a/roles/python/tests/test_py38.yaml b/roles/tobiko-compile-python/tests/test_py38.yaml similarity index 100% rename from roles/python/tests/test_py38.yaml rename to roles/tobiko-compile-python/tests/test_py38.yaml diff --git a/zuul.d/unit.yaml b/zuul.d/unit.yaml index 4e2cdae2b..ad4683ed0 100644 --- a/zuul.d/unit.yaml +++ b/zuul.d/unit.yaml @@ -8,7 +8,9 @@ Run unit tests for an OpenStack Python project under cPython version 3.8. Uses tox with the ``py38`` environment. # compile and install python3.8 from source code - pre-run: playbooks/tox-py38/pre.yaml + pre-run: playbooks/unit/pre.yaml + vars: + python_release: "3.8.2" - job: