Andrey Kurilin 859924eeb4 Various improvements for rally-task-at-devstack job
* Move zuul configuration to .zuul.d directory. It allows to place job
  definitions into separate files (we have a lot of jobs).
* Copy `extra` files to the right folder
* Add check for rally results directory existance before fetching it
* Stop play if `rally task start` fails with unexpected error code
* Export RALLY_PLUGINS_DIR and RALLY_EXTRA_DIR environment variables
  before launching rally task, to provide backward compatibility.
  (see https://github.com/openstack/mistral/blob/master/rally-jobs/task-mistral.yaml#L1 )
* Save one line message about happened error
* Load custom plugins

Change-Id: I1004afb29b9c173e414c59ef54bf58458b5d9422
2018-03-05 16:29:10 +02:00

18 lines
704 B
YAML

- name: Check OpenStack resources after Rally launch
become: yes
become_user: stack
shell: "python ./tests/ci/osresources.py --compare-with-list {{ rally_resources_at_start }}"
args:
chdir: "{{ zuul.projects['git.openstack.org/openstack/rally-openstack'].src_dir }}"
register: command_result
ignore_errors: True
- name: Check results of listing resources
shell:
cmd: |
if [ "{{ command_result.rc }}" != "0" ] && [ ! -f "{{ rally_results_dir }}/status.txt" ]; then
echo "OSResources check found resources which appeared after Rally Task execution. Check cleanup logs for errors." > "{{ rally_results_dir }}/status.txt"
fi
exit "{{ command_result.rc }}"