Make Insight Collector HTML report configurable
Current situation
Currently, the Insight Collector service produces a HTML report for each completed workflow. We need to make it configurable.
Desired outcome
The Insight Collector already has a configuration file use possibility to configure the execution log detail level. This configuration file will present the following structure:
insights:
- name: executionlog
kind: ExecutionLog
spec:
step-depth: ...
- name: summary report
kind: SummaryReport
if: ...
spec:
scope: ...
template:
- name: Summary
kind: SummaryBlock
- name: Jobs
kind: Cloud
datasource: jobs
- name: Tags
kind: Table
datasource: tags
scope: ... (???)
columns:
...
- name: Failed Testcases
kind: Table
if: ...
datasource: testcases
- name: Good Testcases
kind: Table
if: ...
datasource: testcases
Each kind: SummaryReport section allows for configuring the condition on which the report file is generated, the report scope and the report template. The template subsection allows for choosing the data sources to include in the report and the conditions on which they will be included. For tables, it is also possible to choose the columns to display (like with the custom-columns option on the tools side).
Semantics
If an if conditional is used, the designed part or report is only generated if the condition is True.
If a scope is defined, the report only includes elements that match the scope. For example, the following report will only include jobs that produced junit test results, tags relevant to those jobs, and junit testcases.
insights:
- name: summary report
kind: SummaryReport
spec:
scope: test.technology == 'junit'
template:
- name: Summary
kind: SummaryBlock
- name: Jobs
kind: Cloud
datasource: jobs
- name: Tags
kind: Table
datasource: tags
columns:
...
- name: Failed Testcases
kind: Table
if: ...
datasource: testcases
- name: Good Testcases
kind: Table
if: ...
datasource: testcases