Add linters job
Fix lint errors to unblock CI Change-Id: I02c1d7cc9f2f91e76d1b3edbc340df7ea83d2902
This commit is contained in:
parent
3f91201be5
commit
f234b87bbb
@ -196,9 +196,11 @@
|
||||
- metalsmith-integration-glance-centos8-legacy
|
||||
- metalsmith-integration-glance-netboot-cirros
|
||||
- metalsmith-integration-http-netboot-cirros
|
||||
- openstack-tox-linters
|
||||
gate:
|
||||
jobs:
|
||||
- metalsmith-integration-glance-centos8-uefi
|
||||
- metalsmith-integration-glance-centos8-legacy
|
||||
- metalsmith-integration-glance-netboot-cirros
|
||||
- metalsmith-integration-http-netboot-cirros
|
||||
- openstack-tox-linters
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Perform initial setup
|
||||
include: initial-setup.yaml
|
||||
import_playbook: initial-setup.yaml
|
||||
|
||||
- hosts: all
|
||||
environment:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Perform initial setup
|
||||
include: initial-setup.yaml
|
||||
import_playbook: initial-setup.yaml
|
||||
|
||||
- hosts: all
|
||||
environment:
|
||||
|
8
tools/ansible-lint.sh
Normal file
8
tools/ansible-lint.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
find playbooks -maxdepth 1 -type f -regex '.*.ya?ml' -print0 | \
|
||||
xargs -t -n1 -0 ansible-lint -x metadata -vv --nocolor
|
||||
find roles -maxdepth 1 -mindepth 1 -type d -printf "%p/\n" | \
|
||||
xargs -t -n1 ansible-lint -x metadata -vv --nocolor
|
9
tox.ini
9
tox.ini
@ -92,3 +92,12 @@ application-import-names = metalsmith
|
||||
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
|
||||
# [H904] Delay string interpolations at logging calls.
|
||||
enable-extensions=H106,H203,H204,H205,H210,H904
|
||||
|
||||
[testenv:linters]
|
||||
usedevelop = False
|
||||
allowlist_externals = bash
|
||||
deps =
|
||||
ansible>=5,<6
|
||||
ansible-lint>=5,<6
|
||||
commands =
|
||||
bash tools/ansible-lint.sh
|
Loading…
Reference in New Issue
Block a user