From 75705bc3bfb507e227fbd1cbc7cb3727a85ea72a Mon Sep 17 00:00:00 2001 From: David Moreau-Simard Date: Thu, 12 Oct 2017 12:50:42 -0400 Subject: [PATCH] Add a toggle to disable ARA static report generation Without this patch, it is not possible for jobs to disable the ara report generation because it is part of the base job by default. It might be useful (or required) for jobs to disable the static report generation if there are issues with it or if the static report is causing problems. This toggle will provide that ability. Change-Id: Ia5e43db9f852d405ea987b380e36cb93c983314d --- roles/emit-ara-html/README.rst | 5 +++++ roles/emit-ara-html/defaults/main.yaml | 3 +++ roles/emit-ara-html/tasks/main.yaml | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/roles/emit-ara-html/README.rst b/roles/emit-ara-html/README.rst index 389c63b06..bca365610 100644 --- a/roles/emit-ara-html/README.rst +++ b/roles/emit-ara-html/README.rst @@ -2,6 +2,11 @@ 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. + Defaults to ``true``. + .. zuul:rolevar:: ara_compress_html Whether to compress the ARA HTML output or not. diff --git a/roles/emit-ara-html/defaults/main.yaml b/roles/emit-ara-html/defaults/main.yaml index 29dedca2e..c95c8acdc 100644 --- a/roles/emit-ara-html/defaults/main.yaml +++ b/roles/emit-ara-html/defaults/main.yaml @@ -1,2 +1,5 @@ +# Whether to generate a static ARA HTML report or not +ara_generate_html: true + # Whether to compress the ARA HTML output or not ara_compress_html: true diff --git a/roles/emit-ara-html/tasks/main.yaml b/roles/emit-ara-html/tasks/main.yaml index d22d8f979..34a71ad98 100644 --- a/roles/emit-ara-html/tasks/main.yaml +++ b/roles/emit-ara-html/tasks/main.yaml @@ -12,7 +12,10 @@ - name: Generate ARA html output command: "ara generate html {{ zuul.executor.log_root }}/ara" ignore_errors: yes - when: ara_command_type|succeeded and not ara_command_type|skipped + when: + - ara_command_type | succeeded + - not ara_command_type | skipped + - ara_generate_html | bool - name: Compress ARA html output command: gzip --recursive --best {{ zuul.executor.log_root }}/ara