diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2019-12-25 07:58:59 +0900 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2019-12-29 05:20:33 +0900 |
commit | c5dd1536a0f33c7b1eabf08079e16e5817ff0e1f (patch) | |
tree | bfc9e67892e73250731786cf308ff3feef17e02e /roles | |
parent | 3e54ba096f172ec8979d5146f287203d995148e0 (diff) | |
download | horizon-c5dd1536a0f33c7b1eabf08079e16e5817ff0e1f.tar.gz |
Prepare non-primary Django tests in zuul jobs
We already have a template 'horizon-non-primary-django-jobs'
to test horizon and plugins with non-primary django versions,
but we still need to update tox.ini in all horizon plugins
whenever we change Django versions used.
This commit prepares per-Django environment in the zuul job.
Per-Django tox environments like py3-{dj111,dj20,dj22} are
no longer needed. It would be a big merit that we will no longer
need to update tox.ini in all horizon plugins.
The downside is that we do not provide a convenient way to
test it locally, but I think it can be covered in the document.
Change-Id: I726b19130ee9e7d06eb33231071c2673cfd3a49f
Diffstat (limited to 'roles')
-rw-r--r-- | roles/ensure-django/defaults/main.yaml | 3 | ||||
-rw-r--r-- | roles/ensure-django/tasks/main.yaml | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/roles/ensure-django/defaults/main.yaml b/roles/ensure-django/defaults/main.yaml new file mode 100644 index 000000000..5236efc7c --- /dev/null +++ b/roles/ensure-django/defaults/main.yaml @@ -0,0 +1,3 @@ +django_version: "" +tox_envlist: venv +zuul_work_dir: "{{ zuul.project.src_dir }}" diff --git a/roles/ensure-django/tasks/main.yaml b/roles/ensure-django/tasks/main.yaml new file mode 100644 index 000000000..b3414d3cf --- /dev/null +++ b/roles/ensure-django/tasks/main.yaml @@ -0,0 +1,4 @@ +- name: "Install Django" + command: ".tox/{{ tox_envlist }}/bin/python -m pip install django{{ django_version }}" + args: + chdir: "{{ zuul_work_dir }}" |