Skip to main content

Converts ansible-lint JSON output into GitLab friendly format (JUnit XML, Codeclimate)

Project description

Ansible Lint GitLab

The ansible-lint JSON output to GitLab friendly JUnit converter.

Installation

via pip:

pip install ansible-lint-gitlab

Updating

via pip:

pip install ansible-lint-gitlab --upgrade

Usage:

  • You can run ansible-lint -f json on your playbook(s) and pipe the output in
    ansible-lint playbook.yml -f json | ansible-lint-gitlab -o ansible-lint-gitlab.xml
    
  • You can use a temporary file to store the output of ansible-lint. After that run ansible-lint-gitlab and pass the generated file to it
    ansible-lint -f json your_fancy_playbook.yml > ansible-lint.json
    ansible-lint-gitlab ansible-lint.json -o ansible-lint-gitlab.xml
    

Output

  • If there are any lint errors, full JUnit XML will be created.
  • If there are no errors, an empty JUnit XML will be created.

Development

This project is packaged with setuptools using a PEP 621 [project] table in pyproject.toml — there is no setup.py. The package version is declared dynamically and read from src/ansible_lint_gitlab/version.py, which is the single source of truth.

Build the distribution artifacts (sdist and wheel) with the build frontend:

pip install build
python -m build

Run the tests with pytest:

pip install pytest
pytest

Contributing

Commit messages must follow the Conventional Commits format, since releases and the CHANGELOG.md are produced automatically by semantic-release. See AGENTS.md for the accepted commit types and project conventions.

License

The ansible-lint-gitlab project is distributed under the MIT license.

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_gitlab-1.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansible_lint_gitlab-1.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file ansible_lint_gitlab-1.0.1.tar.gz.

File metadata

  • Download URL: ansible_lint_gitlab-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for ansible_lint_gitlab-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1e6b57a2979d3d1cfdddc41203f34dc2b03bdb49c964f8b1571b34dedf432db7
MD5 629803ce91729304bb8498f017860aee
BLAKE2b-256 73773d3b16478c2673c33ed10ce7fb58aa88644e9b4de6d89ac3c862d9c744e9

See more details on using hashes here.

File details

Details for the file ansible_lint_gitlab-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansible_lint_gitlab-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a84484547557a32c2925cd6479e8fec2ab90361cada98e58cf27baf0f09a3399
MD5 565e2ef93f9b5ca16771a5628c429292
BLAKE2b-256 d73e69f709113cfc5c67904db0fc658ab27c6739503eafe1e65d303c791d50e9

See more details on using hashes here.

Supported by

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