summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-23 10:14:29 +0000
committerGerrit Code Review <review@openstack.org>2018-10-23 10:14:29 +0000
commit08af5f0110672a14917adb8fd1389fc37f433ab7 (patch)
tree4a044a6fbdfa59df57c2eb4c9bb60c55ce398446
parenta4f435101317c377c7bb5331e9f2cdd93cbb213a (diff)
parent0657f74a263c6c1c8d08f1440ffba84cbeab5b7d (diff)
Merge "Remove the "emit-ara-html" role"
-rw-r--r--roles/emit-ara-html/README.rst35
-rw-r--r--roles/emit-ara-html/defaults/main.yaml12
-rw-r--r--roles/emit-ara-html/tasks/main.yaml43
3 files changed, 0 insertions, 90 deletions
diff --git a/roles/emit-ara-html/README.rst b/roles/emit-ara-html/README.rst
deleted file mode 100644
index 1a64de1..0000000
--- a/roles/emit-ara-html/README.rst
+++ /dev/null
@@ -1,35 +0,0 @@
1**THIS ROLE IS DEPRECATED**, please use the ``ara-report`` role instead.
2``ara-report`` provides the same default behavior with the generation of a HTML
3report and provides additional functionality that can be used to dynamically
4load databases for improved performance and scalability.
5
6Have ARA generate html logs if ARA and ARA data are both present.
7
8**Role Variables**
9
10.. zuul:rolevar:: ara_generate_html
11
12 Whether to generate a static ARA HTML report or not.
13 Possible values:
14
15 - ``true`` (always generate a report)
16 - ``false`` (never generate a report)
17 - ``failure`` (only generate a report on failure)
18
19 Defaults to ``true``.
20
21.. zuul:rolevar:: ara_compress_html
22
23 Whether to compress the ARA HTML output or not.
24 Defaults to ``true``.
25
26.. zuul:rolevar:: ara_save_database
27
28 Whether the ARA sqlite database should be saved as part of the logs.
29 Defaults to ``false``.
30
31.. tip::
32 Make sure the web server is configured to set the required mimetypes_ in
33 order to serve gzipped content properly.
34
35.. _mimetypes: https://git.openstack.org/cgit/openstack-infra/puppet-openstackci/tree/templates/logs.vhost.erb?id=5fe1f3d2d5e40c2458721e7dcf8631d62ea2525f#n24
diff --git a/roles/emit-ara-html/defaults/main.yaml b/roles/emit-ara-html/defaults/main.yaml
deleted file mode 100644
index 334b8c6..0000000
--- a/roles/emit-ara-html/defaults/main.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
1# Whether to generate a static ARA HTML report or not
2# Possible values:
3# - true (always)
4# - false (never)
5# - 'failure' (only on failure)
6ara_generate_html: true
7
8# Whether to compress the ARA HTML output or not
9ara_compress_html: true
10
11# Whether to save the ARA sqlite database as part of the logs or not
12ara_save_database: false
diff --git a/roles/emit-ara-html/tasks/main.yaml b/roles/emit-ara-html/tasks/main.yaml
deleted file mode 100644
index 179d081..0000000
--- a/roles/emit-ara-html/tasks/main.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
1- name: Warn about deprecated role
2 debug:
3 msg: |
4 The emit-ara-html role is deprecated.
5 Please use the ara-report role instead.
6
7- name: Check for ARA db
8 stat:
9 path: "{{ zuul.executor.work_root }}/.ara/ansible.sqlite"
10 register: ara_db_stat
11
12- name: Save the ARA database
13 command: |
14 cp "{{ zuul.executor.work_root }}/.ara/ansible.sqlite" \
15 {{ zuul.executor.log_root }}
16 when:
17 - ara_db_stat.stat.exists
18 - ara_save_database | bool
19
20- name: Check for ARA install
21 command: bash -c "type -p ara"
22 ignore_errors: yes
23 register: ara_command_type
24 when: ara_db_stat.stat.exists
25
26- when:
27 - ara_command_type.rc == 0
28 - not ara_command_type | skipped
29 block:
30 # Always generate (true), never (false) or only on failure ('failure')
31 # Additionally cover for edge cases where zuul_success might be undefined
32 - name: Generate ARA html output
33 command: "ara generate html {{ zuul.executor.log_root }}/ara"
34 ignore_errors: yes
35 when: ara_generate_html | bool or
36 (ara_generate_html == 'failure' and not zuul_success | default(false) | bool)
37 register: ara_generated
38
39 - name: Compress ARA html output
40 command: gzip --recursive --best {{ zuul.executor.log_root }}/ara
41 ignore_errors: yes
42 when:
43 - not ara_generated | skipped