https://github.com/wasilak/ansible-lint-junit
ansible-lint to JUnit converter
https://github.com/wasilak/ansible-lint-junit
ansible junit python
Last synced: 3 months ago
JSON representation
ansible-lint to JUnit converter
- Host: GitHub
- URL: https://github.com/wasilak/ansible-lint-junit
- Owner: wasilak
- License: mit
- Created: 2017-03-20T14:35:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T15:18:25.000Z (9 months ago)
- Last Synced: 2025-04-10T02:13:38.120Z (3 months ago)
- Topics: ansible, junit, python
- Language: Python
- Homepage:
- Size: 58.6 KB
- Stars: 14
- Watchers: 2
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/wasilak/ansible-lint-junit)
[](https://lgtm.com/projects/g/wasilak/ansible-lint-junit/alerts/)
[](https://lgtm.com/projects/g/wasilak/ansible-lint-junit/context:python)
[](https://codeclimate.com/github/wasilak/ansible-lint-junit/maintainability)Ansible-lint-junit
---The [ansible-lint](https://github.com/willthames/ansible-lint) to JUnit converter.
### Installation
via pip:
```shell
pip install ansible-lint-junit
```### Updating
via pip:
```shell
pip install ansible-lint-junit --upgrade
```### Usage:
- You can run `ansible-lint` on your playbook(s) and redirect output to pipe
```shell
ansible-lint playbook.yml -p --nocolor | ansible-lint-junit -o ansible-lint.xml
```
- You can use a temporary file to store the output of `ansible-lint`.
After that run `ansible-lint-junit` and pass generated file to it
```shell
ansible-lint -p --nocolor your_fancy_playbook.yml > ansible-lint.txt
ansible-lint-junit ansible-lint.txt -o 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.### License
The ansible-lint-junit project is distributed under the [MIT] license.