diff --git a/rally-jobs/cinder.yaml b/rally-jobs/cinder.yaml index 0a084d7d..f3402ad0 100755 --- a/rally-jobs/cinder.yaml +++ b/rally-jobs/cinder.yaml @@ -134,7 +134,7 @@ roles: - admin images: - image_url: "~/.rally/extra/fake-image.img" + image_url: "~/.rally/extra/dummy_image.raw" disk_format: "raw" container_format: "bare" images_per_tenant: 1 diff --git a/rally-jobs/keystone-glance-swift.yaml b/rally-jobs/keystone-glance-swift.yaml index e2fd7339..9a159c74 100644 --- a/rally-jobs/keystone-glance-swift.yaml +++ b/rally-jobs/keystone-glance-swift.yaml @@ -456,7 +456,7 @@ tenants: 2 users_per_tenant: 1 images: - image_url: "~/.rally/extra/fake-image.img" + image_url: "~/.rally/extra/dummy_image.qcow2" disk_format: "qcow2" container_format: "bare" images_per_tenant: 2 @@ -467,7 +467,7 @@ GlanceImages.create_and_list_image: - args: - image_location: "~/.rally/extra/fake-image.img" + image_location: "~/.rally/extra/dummy_image.qcow2" container_format: "bare" disk_format: "qcow2" runner: @@ -484,6 +484,25 @@ sla: failure_rate: max: 100 + - + args: + image_location: "~/.rally/extra/dummy_image.raw" + container_format: "bare" + disk_format: "raw" + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + api_versions: + glance: + version: 2 + sla: + failure_rate: + max: 100 SwiftObjects.create_container_and_object_then_list_objects: - diff --git a/rally-jobs/neutron-trunk.yaml b/rally-jobs/neutron-trunk.yaml index a4b7523a..e3bb9a54 100644 --- a/rally-jobs/neutron-trunk.yaml +++ b/rally-jobs/neutron-trunk.yaml @@ -6,11 +6,11 @@ - args: network_create_args: {} - subport_count: 10 + subport_count: 5 runner: type: "constant" - times: 100 - concurrency: 10 + times: 10 + concurrency: 5 context: users: tenants: 3 diff --git a/tests/ci/playbooks/.ansible-lint b/tests/ci/playbooks/.ansible-lint new file mode 100644 index 00000000..72ed13f7 --- /dev/null +++ b/tests/ci/playbooks/.ansible-lint @@ -0,0 +1,39 @@ +# NOTE(andreykurilin): ansible-lint expects playbooks to be in a separate +# directory called 'playbooks'. There is no real reason for such structure +# and it also requires specific ansible config option to be specified so +# playbooks can find roles. +# https://docs.ansible.com/ansible/latest/user_guide/sample_setup.html#sample-directory-layout +# Despite the fact, ansible-lint has 'kinds' configuration option for +# specifying 'custom' structure, it doesn't support relative paths, so the +# name of repository is hardcoded here. Not the best solution, but should +# work as soon as nobody renames it locally :) +kinds: + - playbook: "**/rally_openstack/tests/ci/playbooks/*.{yml,yaml}" + +mock_roles: + # zuul specific roles + - copy-build-sshkey + - multi-node-hosts-file + - multi-node-known-hosts + - bindep + - fetch-tox-output + - run-devstack + +mock_modules: + - synchronize + - zuul_return + +skip_list: + - no-changed-when # Commands should not change things if nothing needs doing + - unnamed-task # All tasks should be named + - fqcn[action-core] # Use FQCN for builtin module actions (shell) + - name[template] # Jinja templates should only be at the end of 'name' + - command-instead-of-shell # Use shell only when shell functionality is required. + - no-jinja-when # No Jinja2 in when. + # FIXME(andreykurilin): all the rules from the list bellow should be fixed + - key-order[play] + - name[play] + - risky-file-permissions + - risky-shell-pipe + - var-naming[pattern] + - command-instead-of-module diff --git a/tests/ci/playbooks/fetch-html-and-json-reports.yaml b/tests/ci/playbooks/fetch-html-and-json-reports.yaml index 51322154..ec533dc2 100644 --- a/tests/ci/playbooks/fetch-html-and-json-reports.yaml +++ b/tests/ci/playbooks/fetch-html-and-json-reports.yaml @@ -5,22 +5,22 @@ tasks: - shell: "ls {{ rally_results_dir }}" register: results_dir_stat - ignore_errors: True + ignore_errors: true - name: Save results - become: yes + become: true when: results_dir_stat.rc == 0 synchronize: - src: "{{ rally_results_dir }}{% if not rally_results_dir.endswith('/')%}/{% endif %}" + src: "{{ rally_results_dir }}{% if not rally_results_dir.endswith('/') %}/{% endif %}" dest: '{{ zuul.executor.log_root }}/' mode: pull copy_links: true verify_host: true rsync_opts: - - --include=/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs + - --include=/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs - name: "Return artifact to Zuul - {{ html_report }}" zuul_return: @@ -31,7 +31,7 @@ url: "{{ html_report }}" when: html_report in results_dir_stat.stdout - - name: "Return artifact to Zuul - {{ json_report}}" + - name: "Return artifact to Zuul - {{ json_report }}" zuul_return: data: zuul: diff --git a/tests/ci/playbooks/post-rally-verify.yaml b/tests/ci/playbooks/post-rally-verify.yaml index 688a0a04..ab358031 100644 --- a/tests/ci/playbooks/post-rally-verify.yaml +++ b/tests/ci/playbooks/post-rally-verify.yaml @@ -24,4 +24,4 @@ - --include=/** - --include=*/ - --exclude=* - - --prune-empty-dirs \ No newline at end of file + - --prune-empty-dirs diff --git a/tests/ci/playbooks/roles/check-task-sla/tasks/main.yaml b/tests/ci/playbooks/roles/check-task-sla/tasks/main.yaml index 9a05127c..f703539c 100644 --- a/tests/ci/playbooks/roles/check-task-sla/tasks/main.yaml +++ b/tests/ci/playbooks/roles/check-task-sla/tasks/main.yaml @@ -1,4 +1,4 @@ - name: Check SLA of the last task - become: True + become: true become_user: stack shell: "rally task sla-check > {{ rally_results_dir }}/sla.txt" diff --git a/tests/ci/playbooks/roles/docker-build-image/defaults/main.yaml b/tests/ci/playbooks/roles/docker-build-image/defaults/main.yaml index 60927750..d783b2d5 100644 --- a/tests/ci/playbooks/roles/docker-build-image/defaults/main.yaml +++ b/tests/ci/playbooks/roles/docker-build-image/defaults/main.yaml @@ -3,4 +3,4 @@ docker_image_version: "{{ zuul.tag }}" docker_image_tag: "{{ docker_repository }}:{{ docker_image_version }}" rally_project_path: "{{ zuul.projects['opendev.org/openstack/rally'].src_dir }}" rally_plugin_name: "Dummy.dummy" -rally_package_name: "" \ No newline at end of file +rally_package_name: "" diff --git a/tests/ci/playbooks/roles/docker-build-image/tasks/main.yaml b/tests/ci/playbooks/roles/docker-build-image/tasks/main.yaml index b906f617..6535cab9 100644 --- a/tests/ci/playbooks/roles/docker-build-image/tasks/main.yaml +++ b/tests/ci/playbooks/roles/docker-build-image/tasks/main.yaml @@ -25,8 +25,8 @@ fail: msg: "{{ rally_package_name }} is not discoverable." when: - - '"{{ rally_package_name }}" != ""' - - '"{{ rally_package_name }}" not in rally_version_info.stdout' + - '"{{ rally_package_name }}" != ""' + - '"{{ rally_package_name }}" not in rally_version_info.stdout' - name: "Check availability of {{ rally_plugin_name }} plugin" shell: docker run {{ docker_image_tag }} plugin show {{ rally_plugin_name }} diff --git a/tests/ci/playbooks/roles/fetch-rally-task-results/tasks/main.yaml b/tests/ci/playbooks/roles/fetch-rally-task-results/tasks/main.yaml index de395ba0..8d47b7d5 100644 --- a/tests/ci/playbooks/roles/fetch-rally-task-results/tasks/main.yaml +++ b/tests/ci/playbooks/roles/fetch-rally-task-results/tasks/main.yaml @@ -1,5 +1,7 @@ - name: Change the status message - become: yes + become: true + vars: + os_rally_src: "{{ zuul.projects['opendev.org/openstack/rally-openstack'].src_dir }}" shell: cmd: | set -e @@ -10,7 +12,7 @@ fi if [ "$MSG" != "OK" ]; then - sed -i -- "s/var errorMessage = null\;/var errorMessage = \'$MSG\';/g" {{ zuul.projects['opendev.org/openstack/rally-openstack'].src_dir }}/tests/ci/pages/task-index.html + sed -i -- "s/var errorMessage = null\;/var errorMessage = \'$MSG\';/g" {{ os_rally_src }}/tests/ci/pages/task-index.html fi - name: Check the existence of results dir @@ -19,15 +21,15 @@ register: results_dir_stat - name: Gzip custom plugins - become: yes + become: true become_user: stack shell: "tar -czf {{ rally_results_dir }}/plugins.tar.gz ./plugins" args: chdir: '{{ rally_home_dir }}' - when: results_dir_stat.stat.exists == True + when: results_dir_stat.stat.exists - name: Copy Rally results - become: yes + become: true synchronize: src: '{{ rally_results_dir }}' dest: '{{ zuul.executor.log_root }}' @@ -39,10 +41,10 @@ - --include=*/ - --exclude=* - --prune-empty-dirs - when: results_dir_stat.stat.exists == True + when: results_dir_stat.stat.exists - name: Put index.html in the right place - become: yes + become: true synchronize: src: "{{ zuul.projects['opendev.org/openstack/rally-openstack'].src_dir }}/tests/ci/pages/task-index.html" dest: '{{ zuul.executor.log_root }}/index.html' diff --git a/tests/ci/playbooks/roles/import-task-results/tasks/main.yaml b/tests/ci/playbooks/roles/import-task-results/tasks/main.yaml index ba67771f..6f6d419c 100644 --- a/tests/ci/playbooks/roles/import-task-results/tasks/main.yaml +++ b/tests/ci/playbooks/roles/import-task-results/tasks/main.yaml @@ -1,9 +1,9 @@ - name: Import a current JSON report - become: True + become: true become_user: stack command: rally task import --file {{ rally_results_dir }}/report.json - name: Import an old JSON report - become: True + become: true become_user: stack command: rally task import --file {{ rally_results_dir }}/results.json diff --git a/tests/ci/playbooks/roles/list-os-resources/defaults/main.yaml b/tests/ci/playbooks/roles/list-os-resources/defaults/main.yaml index 187f0227..92760bf2 100644 --- a/tests/ci/playbooks/roles/list-os-resources/defaults/main.yaml +++ b/tests/ci/playbooks/roles/list-os-resources/defaults/main.yaml @@ -1,3 +1,3 @@ -compare: False +compare: false resources_at_start_dest: '{{ rally_results_dir }}/resources_at_start.txt' -cleanup_error_msg: "OSResources check found resources which appeared after Rally Task execution. Check cleanup logs for errors." \ No newline at end of file +cleanup_error_msg: "OSResources check found resources which appeared after Rally Task execution. Check cleanup logs for errors." diff --git a/tests/ci/playbooks/roles/list-os-resources/tasks/list_and_compare_resources.yaml b/tests/ci/playbooks/roles/list-os-resources/tasks/list_and_compare_resources.yaml index e01734ff..43b2b42f 100644 --- a/tests/ci/playbooks/roles/list-os-resources/tasks/list_and_compare_resources.yaml +++ b/tests/ci/playbooks/roles/list-os-resources/tasks/list_and_compare_resources.yaml @@ -1,9 +1,9 @@ - name: Check OpenStack resources after Rally launch - become: yes + become: true become_user: stack osresources: compare_with: "{{ resources_at_start_dest }}" - ignore_errors: yes + ignore_errors: true register: command_result - name: Check the existence of status.txt @@ -14,7 +14,7 @@ - name: Update status.txt shell: echo "{{ cleanup_error_msg }}" > "{{ rally_results_dir }}/status.txt" - when: command_result.rc != 0 and custom_plugins_stat.stat.exists == False + when: command_result.rc != 0 and not custom_plugins_stat.stat.exists - name: Fail if there are some resources left after Rally execution (for rally-openstack project) fail: diff --git a/tests/ci/playbooks/roles/list-os-resources/tasks/list_resources.yaml b/tests/ci/playbooks/roles/list-os-resources/tasks/list_resources.yaml index 6e304a3e..a85f2a03 100644 --- a/tests/ci/playbooks/roles/list-os-resources/tasks/list_resources.yaml +++ b/tests/ci/playbooks/roles/list-os-resources/tasks/list_resources.yaml @@ -1,9 +1,9 @@ - name: Save available OpenStack resources before Rally launch - become: yes + become: true become_user: stack osresources: json_output: "{{ resources_at_start_dest }}" - ignore_errors: yes + ignore_errors: true register: command_result - name: Fail if there is an error while executing previos command (for rally-openstack project) diff --git a/tests/ci/playbooks/roles/list-os-resources/tasks/main.yaml b/tests/ci/playbooks/roles/list-os-resources/tasks/main.yaml index b9e991cd..a1074dfc 100644 --- a/tests/ci/playbooks/roles/list-os-resources/tasks/main.yaml +++ b/tests/ci/playbooks/roles/list-os-resources/tasks/main.yaml @@ -1,5 +1,7 @@ - include_tasks: list_resources.yaml - when: "{%- if compare|bool %}{% else %}True{% endif -%}" + when: + - not compare - include_tasks: list_and_compare_resources.yaml - when: "{%- if compare|bool %}True{% endif -%}" \ No newline at end of file + when: + - compare diff --git a/tests/ci/playbooks/roles/prepare-for-rally-task/defaults/main.yaml b/tests/ci/playbooks/roles/prepare-for-rally-task/defaults/main.yaml index 99424b5a..ddf9a04c 100644 --- a/tests/ci/playbooks/roles/prepare-for-rally-task/defaults/main.yaml +++ b/tests/ci/playbooks/roles/prepare-for-rally-task/defaults/main.yaml @@ -1,4 +1,6 @@ -rally_use_existing_users: False +rally_dummy_qcow2_image: "" +rally_dummy_raw_image: "" +rally_use_existing_users: false existing_users_env_spec: '{{ rally_home_dir }}/env-with-existing-users-config' projects_count: 2 users_per_project: 1 diff --git a/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/create_dummy_image.yaml b/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/create_dummy_image.yaml new file mode 100644 index 00000000..0f02cadf --- /dev/null +++ b/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/create_dummy_image.yaml @@ -0,0 +1,13 @@ +- name: Check the existence of dummy image + stat: + path: '{{ path_to_dummy_image }}' + register: dummy_image_stat + when: path_to_dummy_image + +- name: Create a dummy image + become: true + become_user: stack + shell: "qemu-img create -f {{ dummy_image_type }} {{ path_to_dummy_image }} 100M" + when: + - path_to_dummy_image + - not dummy_image_stat.stat.exists diff --git a/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/main.yaml b/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/main.yaml index 23bc4e1b..f1c1c1b1 100644 --- a/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/main.yaml +++ b/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/main.yaml @@ -1,5 +1,5 @@ - name: Create Rally home directory - become: True + become: true become_user: stack file: path: '{{ rally_home_dir }}' @@ -8,7 +8,7 @@ group: stack - name: Create directory for Rally results - become: True + become: true become_user: stack file: path: '{{ rally_results_dir }}' @@ -17,7 +17,7 @@ group: stack - name: Create directory for OSProfiler reports - become: True + become: true become_user: stack file: path: '{{ rally_results_dir }}/{{ RALLY_OSPROFILER_CHART }}' @@ -26,7 +26,7 @@ group: stack - name: Extend Rally config with - become: True + become: true become_user: stack shell: executable: /bin/bash @@ -35,7 +35,7 @@ echo "osprofiler_chart_mode={{ RALLY_OSPROFILER_CHART }}" >> /etc/rally/rally.conf - name: Create a directory for custom plugins - become: True + become: true become_user: stack file: path: '{{ rally_home_dir }}/plugins' @@ -49,13 +49,13 @@ register: custom_plugins_stat - name: Copy custom plugins, if they are presented - become: True + become: true become_user: stack command: cp -r {{ custom_plugins_stat.stat.path }} {{ rally_home_dir }}/ - when: custom_plugins_stat.stat.exists == True + when: custom_plugins_stat.stat.exists - name: Create a directory for extra files - become: True + become: true become_user: stack file: path: '{{ rally_home_dir }}/extra' @@ -69,26 +69,25 @@ register: extra_files_stat - name: Copy extra files, if they are presented - become: True + become: true become_user: stack command: cp -r {{ extra_files_stat.stat.path }} {{ rally_home_dir }}/ - when: extra_files_stat.stat.exists == True + when: extra_files_stat.stat.exists -- name: Check the existence of fake image - stat: - path: '{{ rally_fake_image_path }}' - register: fake_image_stat +- name: Create dummy raw image + include_tasks: "create_dummy_image.yaml" + vars: + dummy_image_type: "raw" + path_to_dummy_image: "{{ rally_dummy_raw_image }}" -- name: Create a fake image - become: True - become_user: stack - file: - path: '{{ rally_fake_image_path }}' - state: touch - when: fake_image_stat.stat.exists == False +- name: Create dummy qcow2 image + include_tasks: "create_dummy_image.yaml" + vars: + dummy_image_type: "qcow2" + path_to_dummy_image: "{{ rally_dummy_qcow2_image }}" - name: List glance, cinder, neutron resources - become: True + become: true become_user: stack shell: executable: /bin/bash @@ -111,25 +110,25 @@ fi - name: Print Rally environment config - become: True + become: true become_user: stack command: "rally env show --only-spec" - include_tasks: prepare-env-with-existing-users.yaml - when: rally_use_existing_users == True + when: rally_use_existing_users - name: Check Environment works - become: True + become: true become_user: stack command: "rally --debug env check" - name: Print Environment info - become: True + become: true become_user: stack command: "rally env info" - name: Create nova flavor - become: True + become: true become_user: stack shell: executable: /bin/sh @@ -151,13 +150,13 @@ - name: Fail if Rally task file is missed. fail: msg: "'{{ rally_task }}' Rally task file is missed." - when: rally_task_file_stat.stat.exists != True + when: not rally_task_file_stat.stat.exists - name: Copy task file - become: True + become: true become_user: stack command: cp "{{ rally_task_file_stat.stat.path }}" "{{ rally_home_dir }}/task.yaml" - when: rally_task_file_stat.stat.exists == True + when: rally_task_file_stat.stat.exists - name: Check the existence of task_args_file stat: @@ -165,13 +164,13 @@ register: task_args_file_stat - name: Copy task_args_file - become: True + become: true become_user: stack command: cp "{{ task_args_file_stat.stat.path }}" "{{ rally_home_dir }}/task_args_file.yaml" - when: task_args_file_stat.stat.exists == True + when: task_args_file_stat.stat.exists - name: Create an empty task_args_file - become: True + become: true become_user: stack command: echo "{}" > "{{ rally_home_dir }}/task_args_file.yaml" - when: task_args_file_stat.stat.exists == False + when: not task_args_file_stat.stat.exists diff --git a/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/prepare-env-with-existing-users.yaml b/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/prepare-env-with-existing-users.yaml index b5ca7524..842c26d8 100644 --- a/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/prepare-env-with-existing-users.yaml +++ b/tests/ci/playbooks/roles/prepare-for-rally-task/tasks/prepare-env-with-existing-users.yaml @@ -1,5 +1,5 @@ - name: Create keystone projects & users for a new rally environment - become: yes + become: true become_user: stack make_env_spec_with_existing_users: projects_count: "{{ projects_count }}" @@ -8,11 +8,11 @@ path_for_new_spec: "{{ existing_users_env_spec }}" - name: Create a new Rally environment - become: True + become: true become_user: stack shell: rally env create --name devstask-with-users --spec "{{ existing_users_env_spec }}" - name: Print new Rally env spec - become: True + become: true become_user: stack command: "rally env show --only-spec" diff --git a/tests/ci/playbooks/roles/process-task-results/tasks/main.yaml b/tests/ci/playbooks/roles/process-task-results/tasks/main.yaml index 479c8c02..2a8e2be6 100644 --- a/tests/ci/playbooks/roles/process-task-results/tasks/main.yaml +++ b/tests/ci/playbooks/roles/process-task-results/tasks/main.yaml @@ -1,5 +1,5 @@ - name: Generate a HTML report - become: True + become: true become_user: stack shell: executable: /bin/bash @@ -9,31 +9,31 @@ rally task report --html-static --out report.html - name: Show detailed info about task - become: True + become: true become_user: stack shell: "rally task detailed > {{ rally_results_dir }}/detailed.txt" - name: Show detailed info (with per-iteration data) about task - become: True + become: true become_user: stack shell: "rally task detailed --iterations-data > {{ rally_results_dir }}/detailed_with_iterations.txt" - name: Generate a JSON report - become: True + become: true become_user: stack command: rally task report --json --out {{ rally_results_dir }}/report.json - name: Produce an old results file - become: True + become: true become_user: stack shell: "rally task results > {{ rally_results_dir }}/results.json" - name: Make a JUnit report - become: True + become: true become_user: stack command: rally task export --type junit-xml --to {{ rally_results_dir }}/junit.xml - name: Make an ElasticSearch file - become: True + become: true become_user: stack command: rally task export --type elastic --to {{ rally_results_dir }}/elasticsearch.txt diff --git a/tests/ci/playbooks/roles/run-rally-task/tasks/main.yaml b/tests/ci/playbooks/roles/run-rally-task/tasks/main.yaml index 2b9b8a0d..42ba0822 100644 --- a/tests/ci/playbooks/roles/run-rally-task/tasks/main.yaml +++ b/tests/ci/playbooks/roles/run-rally-task/tasks/main.yaml @@ -1,5 +1,5 @@ - name: Run Rally task - become: True + become: true become_user: stack shell: cmd: | @@ -10,10 +10,10 @@ rally --rally-debug task start --task {{ rally_home_dir }}/task.yaml #--task-args-file {{ rally_home_dir }}/task_args_file.yaml executable: /bin/bash register: command_result - ignore_errors: True + ignore_errors: true - name: Check rally task exit code - become: True + become: true become_user: stack shell: cmd: | diff --git a/tests/ci/playbooks/run-rally-task.yaml b/tests/ci/playbooks/run-rally-task.yaml index d4d90db9..59b09c7c 100644 --- a/tests/ci/playbooks/run-rally-task.yaml +++ b/tests/ci/playbooks/run-rally-task.yaml @@ -5,18 +5,19 @@ - hosts: controller vars: rally_home_dir: '/opt/stack/.rally' - rally_fake_image_path: '{{ rally_home_dir }}/extra/fake-image.img' + rally_dummy_qcow2_image: "{{ rally_home_dir }}/extra/dummy_image.qcow2" + rally_dummy_raw_image: "{{ rally_home_dir }}/extra/dummy_image.raw" rally_results_dir: '{{ rally_home_dir }}/results' rally_task_args_file: "100-percent-not-exist-file" roles: - prepare-for-rally-task - #- role: list-os-resources - # vars: - # compare: False + # - role: list-os-resources + # vars: + # compare: False - run-rally-task - process-task-results - import-task-results - #- role: list-os-resources - # vars: - # compare: True + # - role: list-os-resources + # vars: + # compare: True - check-task-sla diff --git a/tests/ci/playbooks/run-rally-verify.yaml b/tests/ci/playbooks/run-rally-verify.yaml index 6b600ee6..1dc5573e 100644 --- a/tests/ci/playbooks/run-rally-verify.yaml +++ b/tests/ci/playbooks/run-rally-verify.yaml @@ -1,21 +1,21 @@ - hosts: all roles: - - run-devstack + - run-devstack - hosts: controller tasks: - - name: Prepare env deployment for tempest - shell: - cmd: | - . /opt/stack/.rally/openrc admin admin - export OS_CACERT=/opt/stack/data/ca-bundle.pem - rally env create --from-sysenv --name tempest - rally env check - executable: /bin/bash + - name: Prepare env deployment for tempest + shell: + cmd: | + . /opt/stack/.rally/openrc admin admin + export OS_CACERT=/opt/stack/data/ca-bundle.pem + rally env create --from-sysenv --name tempest + rally env check + executable: /bin/bash - - name: Run Rally verify - shell: | - . /opt/stack/data/venv/bin/activate - python3 tests/ci/rally_verify.py - args: - chdir: "{{ zuul.project.src_dir }}" + - name: Run Rally verify + shell: | + . /opt/stack/data/venv/bin/activate + python3 tests/ci/rally_verify.py + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/tests/ci/playbooks/tox-functional-env-run.yaml b/tests/ci/playbooks/tox-functional-env-run.yaml index 2949c5bc..c63c3d7f 100644 --- a/tests/ci/playbooks/tox-functional-env-run.yaml +++ b/tests/ci/playbooks/tox-functional-env-run.yaml @@ -4,7 +4,6 @@ - hosts: controller vars: - rally_fake_image_path: '{{ rally_home_dir }}/extra/fake-image.img' rally_task_args_file: "100-percent-not-exist-file" # this task will not be launched, but we need to specify something real to # pass a check at 'prepare-for-rally-task' role. diff --git a/tox.ini b/tox.ini index 4068e620..95308a09 100644 --- a/tox.ini +++ b/tox.ini @@ -36,6 +36,12 @@ passenv = REPORTS_ROOT PYTEST_REPORT +[testenv:zuul-ansible-lint] +setenv = VIRTUAL_ENV={envdir} +skip_install = true +deps = ansible-lint +commands = ansible-lint --strict --config-file tests/ci/playbooks/.ansible-lint tests/ci/playbooks + [testenv:pep8] deps = -r{toxinidir}/test-requirements.txt skip_install = true