summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Kumar <chkumar@redhat.com>2018-10-22 18:11:37 +0530
committerChandan Kumar <chkumar@redhat.com>2018-12-24 10:49:42 +0530
commit881d16fb42bf117aece2b24743eab2654c5639af (patch)
tree8aaa81a74774a80e05ffad01271f1051afc5849a
parentdebdc345cbcc4e00fbfb19e8e13ccf54613887cf (diff)
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
Notes
Notes (review): Verified-1: RDO Third Party CI <dmsimard+rdothirdparty@redhat.com> Code-Review+2: Marios Andreou <marios@redhat.com> Code-Review+2: Quique Llorente <ellorent@redhat.com> Code-Review+2: Sagi Shnaidman <sshnaidm@redhat.com> Workflow+1: Sagi Shnaidman <sshnaidm@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 27 Dec 2018 16:54:10 +0000 Reviewed-on: https://review.openstack.org/612377 Project: openstack/tripleo-quickstart-extras Branch: refs/heads/master
-rw-r--r--roles/validate-tempest/README.md9
-rw-r--r--roles/validate-tempest/defaults/main.yml2
-rw-r--r--roles/validate-tempest/tasks/tempest-venv.yml9
-rw-r--r--roles/validate-tempest/templates/configure-tempest.sh.j24
4 files changed, 23 insertions, 1 deletions
diff --git a/roles/validate-tempest/README.md b/roles/validate-tempest/README.md
index 4eaef14..6cc182c 100644
--- a/roles/validate-tempest/README.md
+++ b/roles/validate-tempest/README.md
@@ -35,6 +35,15 @@ Role Variables
35* `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file 35* `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file
36* `tempest_plugins`: list - List of openstack services tempest plugins to be 36* `tempest_plugins`: list - List of openstack services tempest plugins to be
37 installed 37 installed
38* `tempest_plugins_git`: list - (optional) List of URLs for openstack tempest plugins you want to have installed.
39 (Required) `tempest_format`: venv
40 For example:
41 ```
42 tempest_format: venv
43 tempest_plugins_git: [https://git.openstack.org/openstack/tempest-tripleo-ui,
44 https://git.openstack.org/openstack/keystone-tempest-plugin,
45 https://git.openstack.org/openstack/cinder-tempest-plugin]
46 ```
38* `tempest_extra_config`: dict - A dict of tempest configuration which needs to be overridden in tempest.conf, 47* `tempest_extra_config`: dict - A dict of tempest configuration which needs to be overridden in tempest.conf,
39 It should be like section.key: value. 48 It should be like section.key: value.
40* `tempest_conf_removal`: dict - A dict of tempest configuration which will be 49* `tempest_conf_removal`: dict - A dict of tempest configuration which will be
diff --git a/roles/validate-tempest/defaults/main.yml b/roles/validate-tempest/defaults/main.yml
index 86efd82..4746b26 100644
--- a/roles/validate-tempest/defaults/main.yml
+++ b/roles/validate-tempest/defaults/main.yml
@@ -58,7 +58,7 @@ tempest_plugins: >-
58 {%- else -%} 58 {%- else -%}
59 [ "python-keystone-tests", "python-neutron-tests" ] 59 [ "python-keystone-tests", "python-neutron-tests" ]
60 {%- endif -%} 60 {%- endif -%}
61 61tempest_plugins_git: []
62tempest_extra_config: {} # A dict containing values which needs to be overridden in tempest.conf 62tempest_extra_config: {} # A dict containing values which needs to be overridden in tempest.conf
63skip_file_src: "skip_file.j2" 63skip_file_src: "skip_file.j2"
64skip_file: skip_file 64skip_file: skip_file
diff --git a/roles/validate-tempest/tasks/tempest-venv.yml b/roles/validate-tempest/tasks/tempest-venv.yml
index c6e0069..1e0f5c8 100644
--- a/roles/validate-tempest/tasks/tempest-venv.yml
+++ b/roles/validate-tempest/tasks/tempest-venv.yml
@@ -37,6 +37,15 @@
37 python-virtualenv 37 python-virtualenv
38 {% endif %} 38 {% endif %}
39 39
40- name: Clone tempest plugins
41 git:
42 repo: "{{ item }}"
43 dest: "{{ working_dir }}/{{ item.split('/')[-1] }}"
44 version: master
45 with_items: "{{ tempest_plugins_git }}"
46 when:
47 - tempest_format == 'venv'
48
40- name: Install packages required for create venv 49- name: Install packages required for create venv
41 package: 50 package:
42 state: present 51 state: present
diff --git a/roles/validate-tempest/templates/configure-tempest.sh.j2 b/roles/validate-tempest/templates/configure-tempest.sh.j2
index 03dd5d6..6c02563 100644
--- a/roles/validate-tempest/templates/configure-tempest.sh.j2
+++ b/roles/validate-tempest/templates/configure-tempest.sh.j2
@@ -56,6 +56,10 @@ virtualenv --system-site-packages {{ working_dir }}/tempest_git/.venv
56{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U pip 56{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U pip
57{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U setuptools 57{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U setuptools
58{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/tempest_git junitxml 58{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/tempest_git junitxml
59# Install tempest plugins in tempest .venv
60{% for tempest_plugin in (tempest_plugins_git|default([])) %}
61{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/{{ tempest_plugin.replace('.git', '').split('/')[-1] }}
62{% endfor %}
59 63
60# Install python-tempestconf 64# Install python-tempestconf
61{% if release != 'newton'%} 65{% if release != 'newton'%}