blob: 3724e0ec5eeadf8156062d79f5d71a243312e503 [file] [log] [blame]
Andrea Frittoli (andreaf)e4fdd2f2017-10-04 23:36:20 +01001- name: Check if stackviz archive exists
2 stat:
3 path: "/opt/cache/files/stackviz-latest.tar.gz"
4 register: stackviz_archive
5
6- debug:
7 msg: "Stackviz archive could not be found in /opt/cache/files/stackviz-latest.tar.gz"
8 when: not stackviz_archive.stat.exists
9
10- name: Check if subunit data exists
11 stat:
Michel Petersonac140fe2018-02-27 21:02:36 +020012 path: "{{ zuul_work_dir }}/testrepository.subunit"
Andrea Frittoli (andreaf)e4fdd2f2017-10-04 23:36:20 +010013 register: subunit_input
14
15- debug:
Michel Petersonac140fe2018-02-27 21:02:36 +020016 msg: "Subunit file could not be found at {{ zuul_work_dir }}/testrepository.subunit"
Andrea Frittoli (andreaf)e4fdd2f2017-10-04 23:36:20 +010017 when: not subunit_input.stat.exists
18
19- name: Install stackviz
20 pip:
21 name: "file://{{ stackviz_archive.stat.path }}"
22 virtualenv: /tmp/stackviz
23 extra_args: -U
24 when:
25 - stackviz_archive.stat.exists
26 - subunit_input.stat.exists
27
28- name: Deploy stackviz static html+js
29 command: cp -pR /tmp/stackviz/share/stackviz-html {{ stage_dir }}/stackviz
30 when:
31 - stackviz_archive.stat.exists
32 - subunit_input.stat.exists
33
34- name: Check if dstat data exists
35 stat:
36 path: "{{ devstack_base_dir }}/logs/dstat-csv.log"
37 register: dstat_input
38 when:
39 - stackviz_archive.stat.exists
40 - subunit_input.stat.exists
41
42- name: Run stackviz with dstat
43 shell: |
44 cat {{ subunit_input.stat.path }} | \
45 /tmp/stackviz/bin/stackviz-export \
46 --dstat "{{ devstack_base_dir }}/logs/dstat-csv.log" \
47 --env --stdin \
48 {{ stage_dir }}/stackviz/data
49 when:
50 - stackviz_archive.stat.exists
51 - subunit_input.stat.exists
52 - dstat_input.stat.exists
Jens Harbottaacf6e82018-03-22 14:09:46 +000053 failed_when: False
Andrea Frittoli (andreaf)e4fdd2f2017-10-04 23:36:20 +010054
55- name: Run stackviz without dstat
56 shell: |
57 cat {{ subunit_input.stat.path }} | \
58 /tmp/stackviz/bin/stackviz-export \
59 --env --stdin \
60 {{ stage_dir }}/stackviz/data
61 when:
62 - stackviz_archive.stat.exists
63 - subunit_input.stat.exists
64 - not dstat_input.stat.exists
Jens Harbottaacf6e82018-03-22 14:09:46 +000065 failed_when: False