https://github.com/wasilak/ansible-lint-junit-go
ansible-lint to JUnit converter (GO implementation)
https://github.com/wasilak/ansible-lint-junit-go
Last synced: 4 months ago
JSON representation
ansible-lint to JUnit converter (GO implementation)
- Host: GitHub
- URL: https://github.com/wasilak/ansible-lint-junit-go
- Owner: wasilak
- Created: 2020-03-25T20:44:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T15:07:45.000Z (9 months ago)
- Last Synced: 2025-01-15T18:49:49.000Z (6 months ago)
- Language: Go
- Size: 22.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[ansible-lint](https://github.com/willthames/ansible-lint) to JUnit converter [](https://travis-ci.org/wasilak/ansible-lint-junit-go) [](https://codeclimate.com/github/wasilak/ansible-lint-junit-go/maintainability) [](https://codeclimate.com/github/wasilak/ansible-lint-junit-go/test_coverage) [](https://lgtm.com/projects/g/wasilak/ansible-lint-junit-go/alerts/) [](https://lgtm.com/projects/g/wasilak/ansible-lint-junit-go/context:go)
---### Installation
- download precompiled binary from [releases](https://github.com/wasilak/ansible-lint-junit-go/releases) page
- make it executable with: `chmod +x ansible-lint-junit`### Usage:
1. you can pipe output of `ansible-lint -p`:
```shell
ansible-lint playbook.yml -p | ansible-lint-junit -output ansible-lint.xml
```
3. or run `ansible-lint` on your playbook(s) with parameter `-p` (it is required) and redirect output to file
```shell
ansible-lint -p your_fancy_playbook.yml > ansible-lint.txt
```
and run `ansible-lint-junit` and pass generated file to it
```shell
ansible-lint-junit ansible-lint.txt -output ansible-lint.xml
```### Output
* if there are any lint errors, full JUnit XML will be created
* if there are no errors, empty JUnit XML will be created, this is for i.e. [Bamboo](https://www.atlassian.com/software/bamboo) JUnit parser plugin compatibility.
It will break build if XML is missing or incorrect, and there is really no way of generating XML with *"PASSED"* tests in case of linter.