-
Notifications
You must be signed in to change notification settings - Fork 138
/
run-crowbar-tests.yml
70 lines (60 loc) · 1.8 KB
/
run-crowbar-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
- name: Run Crowbar tests and collect results
hosts: "{{ cloud_env }}"
remote_user: root
gather_facts: True
vars:
task: "tempest"
tempest_results_subunit: "~/tempest.subunit.log"
subunit_xml_results: "~/testr_crowbar.xml"
subunit_html_results: "~/testr_crowbar.html"
pre_tasks:
- include_role:
name: rocketchat_notify
vars:
rc_action: "started"
rc_state: "Started"
when: rc_notify
tasks:
- block:
- name: Crowbar log stream at
debug:
msg: "http://{{ ansible_host }}:9091/"
- include_role:
name: crowbar_setup
vars:
qa_crowbarsetup_cmd: onadmin_testsetup
rescue:
- include_role:
name: rocketchat_notify
vars:
rc_action: "finished"
rc_state: "Failed"
when: rc_notify
- name: Stop if something failed
fail:
msg: "{{ task }} failed."
always:
- include_role:
name: tempest_results
apply:
ignore_errors: yes
- include_role:
name: jenkins_artifacts
vars:
jenkins_artifacts_to_collect:
- src: "{{ admin_mkcloud_config_file }}"
- src: "{{ qa_crowbarsetup_log }}"
- src: "~/tempest.log"
- src: "{{ tempest_results_subunit }}"
- src: "{{ subunit_xml_results }}"
- src: "{{ subunit_html_results }}"
- src: "~/simple_horizon.log"
when: lookup("env", "WORKSPACE")
post_tasks:
- include_role:
name: rocketchat_notify
vars:
rc_action: "finished"
rc_state: "{{ (_qa_crowbarsetup_result.rc > 0) | ternary('Failed', 'Success' )}}"
when: rc_notify