Skip to content

Commit

Permalink
CI fixes for PR
Browse files Browse the repository at this point in the history
- upd collection `README.md`
    - added previously merged filter line `junit2obj`
    - added the role `junit2json`
- fix argument_specs spacing

Signed-off-by: Maxim Kovgan <makovgan@redhat.com>
  • Loading branch information
mvk committed Mar 3, 2025
1 parent d39c862 commit 65426e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Name | Description
[redhatci.ocp.installer](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/installer/README.md) | [IPI installer](https://github.com/openshift-kni/baremetal-deploy)
[redhatci.ocp.install_operator_gitops](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/install_operator_gitops/README.md) | Installs and configures the openshift-gitops-operator so it can be used for ZTP deployments. Installation is optional and may be skipped by setting the variable ```ioc_configure_only: true``
[redhatci.ocp.jenkins_job_launcher](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/jenkins_job_launcher/README.md) | Launch Jenkins jobs
[redhatci.ocp.junit2json](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/junit2json/README.md) | Convert JUnit XML files into JSON for reporting/observability role
[redhatci.ocp.k8s_best_practices_certsuite](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/k8s_best_practices_certsuite/README.md) | Executes the [Red Hat Best Practices Test Suite for Kubernetes](https://github.com/redhat-best-practices-for-k8s/certsuite) tool.
[redhatci.ocp.kvirt_vm](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/kvirt_vm/README.md) | Deployment of Kubevirt virtual machines.
[redhatci.ocp.label_nodes](https://github.com/redhatci/ansible-collection-redhatci-ocp/blob/main/roles/label_nodes/README.md) | Applies labels defined at inventory level to the OCP cluster nodes.
Expand Down Expand Up @@ -161,6 +162,7 @@ Name | Description
Name | Type | Description
--- | --- | ---
[redhatci.ocp.junit2dict]() | Filter | Transforms a JUnit into a dictionary
[redhatci.ocp.junit2obj]() | Filter | Transforms a JUnit into a corresponding JSON text (will replace `redhatci.ocp.junit2dict`)
[redhatci.ocp.ocp_compatibility]() | Filter | Parse the deprecated and to-be-deprecated API after the workload installation
[redhatci.ocp.regex_diff]() | Filter | Obtain differences between two lists
[redhatci.ocp.get_compatible_rhocp_repo]() | Module | A module to find the latest available version of the RHOCP repository
Expand Down
26 changes: 5 additions & 21 deletions roles/junit2json/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,11 @@ argument_specs:
main:
short_description: Main entry point for role redhatci.ocp.junit2json
description: |
This is the main entrypoint for the role `redhatci.ocp.junit2json`.
It scans all the XML reports passed as `junit2json_input_reports` as follows:
- all the files are considered reports
- all the folders are assumed to contain `XML` report files with `.xml` extension
everything is collected into internal list variable.
It has 2 modes of operation:
- `junit2json_do_merge` == `true` (default):
internal list of files is merged and written into `junit2json_input_merged_report` file,
and then the internal list is overwritten with it as 1 item
- `junit2json_do_merge` == `false`:
in this mode `junit2json_input_reports` is processed as previously
Now the internal list is scanned and each file is converted into single `JSON` report file under `junit2json_output_dir`
if `junit_do_merge` is `true`, the output is written into `junit2json_output_merged_report` file under `junit2json_output_dir`
otherwise, each file's `JSON` report is named like the input file, but `.xml` is replaced by `.json`.
edge case of a report without `.xml` extension should be explicitly passed as a file
The resulting JSON file has the same structure for all the teams' and CI systems and used later to be sent
to a logging/monitoring collection system.
The resulting JSON file(s) are of the same structure for all the teams' and CI systems and used later to be sent to the data collection system.
This is the main entrypoint for the role `redhatci.ocp.junit2json`. Scans all the XML reports passed as `junit2json_input_reports`, folders scanned for files matching `global_reports_path_patterns`
The variable `junit2json_do_merge` is `true` by default and then the reports are merged into `junit2json_input_merged_report` file under `junit2json_output_dir`.
If `junit2json_do_merge` is `false`, then each file is converted into single `JSON` report file under `junit2json_output_dir`
if `junit_do_merge` is `true`, the output is written into `junit2json_output_merged_report` file under `junit2json_output_dir`, renaming `.xml` to `.json` or just appending `.json`
author:
- Max Kovgan
options:
Expand Down Expand Up @@ -58,5 +44,3 @@ argument_specs:
description: |
Relative file name for the JSON report (relevant only when `junit2json_do_merge` is `true`),
it is generated under `junit2json_output_dir`

0 comments on commit 65426e8

Please sign in to comment.