Added support for installing tempest plugins from git
In order to use it, in any FS, set tempest_format to venv and then set: tempest_plugins_venv: - '<complete upstream openstack tempest plugin git url>' Change-Id: I95a4449ca3976a914faf1ba5f3f4c0e756a6fefc
This commit is contained in:
parent
debdc345cb
commit
881d16fb42
|
@ -35,6 +35,15 @@ Role Variables
|
||||||
* `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file
|
* `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file
|
||||||
* `tempest_plugins`: list - List of openstack services tempest plugins to be
|
* `tempest_plugins`: list - List of openstack services tempest plugins to be
|
||||||
installed
|
installed
|
||||||
|
* `tempest_plugins_git`: list - (optional) List of URLs for openstack tempest plugins you want to have installed.
|
||||||
|
(Required) `tempest_format`: venv
|
||||||
|
For example:
|
||||||
|
```
|
||||||
|
tempest_format: venv
|
||||||
|
tempest_plugins_git: [https://git.openstack.org/openstack/tempest-tripleo-ui,
|
||||||
|
https://git.openstack.org/openstack/keystone-tempest-plugin,
|
||||||
|
https://git.openstack.org/openstack/cinder-tempest-plugin]
|
||||||
|
```
|
||||||
* `tempest_extra_config`: dict - A dict of tempest configuration which needs to be overridden in tempest.conf,
|
* `tempest_extra_config`: dict - A dict of tempest configuration which needs to be overridden in tempest.conf,
|
||||||
It should be like section.key: value.
|
It should be like section.key: value.
|
||||||
* `tempest_conf_removal`: dict - A dict of tempest configuration which will be
|
* `tempest_conf_removal`: dict - A dict of tempest configuration which will be
|
||||||
|
|
|
@ -58,7 +58,7 @@ tempest_plugins: >-
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
[ "python-keystone-tests", "python-neutron-tests" ]
|
[ "python-keystone-tests", "python-neutron-tests" ]
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
tempest_plugins_git: []
|
||||||
tempest_extra_config: {} # A dict containing values which needs to be overridden in tempest.conf
|
tempest_extra_config: {} # A dict containing values which needs to be overridden in tempest.conf
|
||||||
skip_file_src: "skip_file.j2"
|
skip_file_src: "skip_file.j2"
|
||||||
skip_file: skip_file
|
skip_file: skip_file
|
||||||
|
|
|
@ -37,6 +37,15 @@
|
||||||
python-virtualenv
|
python-virtualenv
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
- name: Clone tempest plugins
|
||||||
|
git:
|
||||||
|
repo: "{{ item }}"
|
||||||
|
dest: "{{ working_dir }}/{{ item.split('/')[-1] }}"
|
||||||
|
version: master
|
||||||
|
with_items: "{{ tempest_plugins_git }}"
|
||||||
|
when:
|
||||||
|
- tempest_format == 'venv'
|
||||||
|
|
||||||
- name: Install packages required for create venv
|
- name: Install packages required for create venv
|
||||||
package:
|
package:
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -56,6 +56,10 @@ virtualenv --system-site-packages {{ working_dir }}/tempest_git/.venv
|
||||||
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U pip
|
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U pip
|
||||||
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U setuptools
|
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U setuptools
|
||||||
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/tempest_git junitxml
|
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/tempest_git junitxml
|
||||||
|
# Install tempest plugins in tempest .venv
|
||||||
|
{% for tempest_plugin in (tempest_plugins_git|default([])) %}
|
||||||
|
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/{{ tempest_plugin.replace('.git', '').split('/')[-1] }}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
# Install python-tempestconf
|
# Install python-tempestconf
|
||||||
{% if release != 'newton'%}
|
{% if release != 'newton'%}
|
||||||
|
|
Loading…
Reference in New Issue