Skip to main content

ansible-lint to JUnit converter.

Project description

ansible-lint to JUnit converter Build Status

Installation

via pip;

# In case of Python 2.x, you have to first run:
# pip install lxml

pip install ansible-lint-junit

Updating

via pip;

pip install ansible-lint-junit --upgrade

Usage:

  1. you can pipe output of ansible-lint:
    # less verbose
    ansible-lint playbook.yml -p --nocolor | ansible-lint-junit -o ansible-lint.xml
    
    # more verbose
    ansible-lint playbook.yml --parseable-severity --nocolor | ansible-lint-junit -o ansible-lint.xml
    
  2. or run ansible-lint on your playbook(s) and redirect output to file
    # less verbose
    ansible-lint -p --nocolor your_fancy_playbook.yml > ansible-lint.txt
    
    # more verbose
    ansible-lint --parseable-severity --nocolor your_fancy_playbook.yml > ansible-lint.txt
    
    and run ansible-lint-junit and pass generated file to it
    # less verbose
    ansible-lint-junit ansible-lint.txt -o ansible-lint.xml
    
    # more verbose
    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 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansible-lint-junit-0.16.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page