Merge "Add support for gzipping static ARA reports"

This commit is contained in:
Zuul 2017-08-23 20:07:11 +00:00 committed by Gerrit Code Review
commit 247a690715
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