From 0657f74a263c6c1c8d08f1440ffba84cbeab5b7d Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Sun, 14 Oct 2018 11:14:45 -0400 Subject: [PATCH] Remove the "emit-ara-html" role The "ara-report" role provides the same functionality and defaults out of the box and adds integration for dynamic database loading. This is removed as per the deprecation notice [1] a few months ago. [1]: http://lists.zuul-ci.org/pipermail/zuul-announce/2018-March/000007.html Change-Id: I1f5eda980b59cb43735d35a4670930f683dc0130 --- roles/emit-ara-html/README.rst | 35 --------------------- roles/emit-ara-html/defaults/main.yaml | 12 ------- roles/emit-ara-html/tasks/main.yaml | 43 -------------------------- 3 files changed, 90 deletions(-) delete mode 100644 roles/emit-ara-html/README.rst delete mode 100644 roles/emit-ara-html/defaults/main.yaml delete mode 100644 roles/emit-ara-html/tasks/main.yaml diff --git a/roles/emit-ara-html/README.rst b/roles/emit-ara-html/README.rst deleted file mode 100644 index 1a64de134..000000000 --- a/roles/emit-ara-html/README.rst +++ /dev/null @@ -1,35 +0,0 @@ -**THIS ROLE IS DEPRECATED**, please use the ``ara-report`` role instead. -``ara-report`` provides the same default behavior with the generation of a HTML -report and provides additional functionality that can be used to dynamically -load databases for improved performance and scalability. - -Have ARA generate html logs if ARA and ARA data are both present. - -**Role Variables** - -.. zuul:rolevar:: ara_generate_html - - Whether to generate a static ARA HTML report or not. - Possible values: - - - ``true`` (always generate a report) - - ``false`` (never generate a report) - - ``failure`` (only generate a report on failure) - - Defaults to ``true``. - -.. zuul:rolevar:: ara_compress_html - - Whether to compress the ARA HTML output or not. - Defaults to ``true``. - -.. zuul:rolevar:: ara_save_database - - Whether the ARA sqlite database should be saved as part of the logs. - Defaults to ``false``. - -.. 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 diff --git a/roles/emit-ara-html/defaults/main.yaml b/roles/emit-ara-html/defaults/main.yaml deleted file mode 100644 index 334b8c6b4..000000000 --- a/roles/emit-ara-html/defaults/main.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Whether to generate a static ARA HTML report or not -# Possible values: -# - true (always) -# - false (never) -# - 'failure' (only on failure) -ara_generate_html: true - -# Whether to compress the ARA HTML output or not -ara_compress_html: true - -# Whether to save the ARA sqlite database as part of the logs or not -ara_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 179d081f1..000000000 --- a/roles/emit-ara-html/tasks/main.yaml +++ /dev/null @@ -1,43 +0,0 @@ -- name: Warn about deprecated role - debug: - msg: | - The emit-ara-html role is deprecated. - Please use the ara-report role instead. - -- name: Check for ARA db - stat: - path: "{{ zuul.executor.work_root }}/.ara/ansible.sqlite" - register: ara_db_stat - -- name: Save the ARA database - command: | - cp "{{ zuul.executor.work_root }}/.ara/ansible.sqlite" \ - {{ zuul.executor.log_root }} - when: - - ara_db_stat.stat.exists - - ara_save_database | bool - -- name: Check for ARA install - command: bash -c "type -p ara" - ignore_errors: yes - register: ara_command_type - when: ara_db_stat.stat.exists - -- when: - - ara_command_type.rc == 0 - - not ara_command_type | skipped - block: - # Always generate (true), never (false) or only on failure ('failure') - # Additionally cover for edge cases where zuul_success might be undefined - - name: Generate ARA html output - command: "ara generate html {{ zuul.executor.log_root }}/ara" - ignore_errors: yes - when: ara_generate_html | bool or - (ara_generate_html == 'failure' and not zuul_success | default(false) | bool) - register: ara_generated - - - name: Compress ARA html output - command: gzip --recursive --best {{ zuul.executor.log_root }}/ara - ignore_errors: yes - when: - - not ara_generated | skipped