-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Add Ansible Lint to build pipeline #1176
Comments
@rafzei It also can be configured via pre-commit git hooks. |
GH Actions is also an option. Anyway, first thing is to create a list of roles as in issue description. |
Also generate output using: https://pypi.org/project/ansible-lint-junit/ This because pytest and pylint are also producing junit output at this point, so we can have everything similar. |
Consider using GitHub Actions. |
Waits for ansible/ansible-lint#1446 |
I tried all workarounds mentioned in ansible/ansible-lint#1446, without success; the |
Tested on pipeline with: cd $(System.DefaultWorkingDirectory)
mkdir -p linting_tests
ansible-lint --nocolor \
--parseable-severity \
> linting_tests/ansible_lint_errors
# Suppress the next line when the "load-failure" bug in ansible-lint is solved
sed -i '/load-failure/d' linting_tests/ansible_lint_errors
error_count=$(wc -l linting_tests/ansible_lint_errors | awk '{ print $1 }')
# Convert to junit
ansible-lint-junit linting_tests/ansible_lint_errors \
-o linting_tests/ansible_lint_errors.xml
test $error_count -le $(ansible_lint_error_threshold) Take a look at the |
|
Is your feature request related to a problem? Please describe.
Currently we have the ability to use Ansible-lint in the devcontainer and output the results in junit format.
Describe the solution you'd like
We want to integrate this into the Azure build pipelines as well and publish the results:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml
Describe alternatives you've considered
None
Additional context
See https://github.com/epiphany-platform/epiphany/blob/develop/core/src/epicli/.vscode/tasks.json how Ansible-lint can be executed.
DoD checklist
The text was updated successfully, but these errors were encountered: