Add support for gzipping static ARA reports

The ARA web application was designed to work properly when fully
gzipped with the proper mimetypes so let's add support for doing
that.

Change-Id: Ic1914c840f5a75e7da07494fb87c2167ae7bed68
This commit is contained in:
David Moreau-Simard 2017-08-20 10:14:18 -04:00
parent 76c78a348e
commit 016035077f
3 changed files with 24 additions and 4 deletions

View File

@ -1 +1,14 @@
Have ara generate html logs if ara and ara data are both present.
Have ARA generate html logs if ARA and ARA data are both present.
**Role Variables**
.. zuul:rolevar:: ara_compress_html
Whether to compress the ARA HTML output or not.
Defaults to ``true``.
.. tip::
Make sure the web server is configured to set the required mimetypes_ in
order to serve gzipped content properly.
.. _mimetypes: https://git.openstack.org/cgit/openstack-infra/puppet-openstackci/tree/templates/logs.vhost.erb?id=5fe1f3d2d5e40c2458721e7dcf8631d62ea2525f#n24

View File

@ -0,0 +1,2 @@
# Whether to compress the ARA HTML output or not
ara_compress_html: true

View File

@ -1,14 +1,19 @@
- name: Check for ara db
- name: Check for ARA db
stat:
path: "{{ zuul.executor.work_root }}/.ara/ansible.sqlite"
register: ara_db_stat
- name: Check for ara install
- name: Check for ARA install
command: which ara
ignore_errors: yes
register: ara_command_type
when: ara_db_stat.stat.exists
- name: Generate ara html output
- name: Generate ARA html output
command: "ara generate html {{ zuul.executor.log_root }}/ara"
when: ara_command_type|succeeded and not ara_command_type|skipped
- name: Compress ARA html output
archive:
path: "{{ zuul.executor.log_root }}/ara"
when: ara_compress_html | bool