Fixed linting
Basically backporting a series of changes from main. Change-Id: Ia23170115f57f70a8ee5c1a3b34686fb53aa47dd Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com> Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
This commit is contained in:
parent
12e90d8e37
commit
bd6fb6d166
|
@ -0,0 +1,3 @@
|
|||
skip_list:
|
||||
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern'
|
||||
- '208' # File permissions not mentioned'
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.1.0
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
|
@ -18,14 +18,14 @@ repos:
|
|||
- id: check-yaml
|
||||
files: .*\.(yaml|yml)$
|
||||
- repo: https://github.com/adrienverge/yamllint.git
|
||||
rev: v1.15.0
|
||||
rev: v1.24.2
|
||||
hooks:
|
||||
- id: yamllint
|
||||
files: \.(yaml|yml)$
|
||||
types: [file, yaml]
|
||||
entry: yamllint --strict -f parsable
|
||||
- repo: https://github.com/ansible/ansible-lint
|
||||
rev: v4.1.1a2
|
||||
rev: v4.3.1
|
||||
hooks:
|
||||
- id: ansible-lint
|
||||
files: \.(yaml|yml)$
|
||||
|
@ -36,7 +36,7 @@ repos:
|
|||
# Things found within roles.galaxy are external
|
||||
# and not something maintained here.
|
||||
- repo: https://github.com/openstack-dev/bashate.git
|
||||
rev: 0.6.0
|
||||
rev: 2.0.0
|
||||
hooks:
|
||||
- id: bashate
|
||||
entry: bashate --error . --verbose --ignore=E006,E040
|
||||
|
|
1
LICENSE
1
LICENSE
|
@ -173,4 +173,3 @@
|
|||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
|
|
|
@ -19,4 +19,3 @@
|
|||
|
||||
# All variables within this role should have a prefix of "tripleo_{{ role_name | replace('-', '_') }}"
|
||||
tripleo_{{ role_name | replace('-', '_') }}_debug: false
|
||||
|
||||
|
|
|
@ -42,4 +42,3 @@ galaxy_info:
|
|||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
dependencies: []
|
||||
|
||||
|
|
|
@ -35,4 +35,3 @@ RUN easy_install {{ pkg }}
|
|||
{% endraw %}
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
||||
|
|
|
@ -19,4 +19,3 @@
|
|||
hosts: all
|
||||
roles:
|
||||
- role: "{{ role_name }}"
|
||||
|
||||
|
|
|
@ -136,4 +136,3 @@ Lastly, we execute the actual backup step. With or without ceph.
|
|||
--become-user root \
|
||||
--tags bar_create_recover_image \
|
||||
~/bar_rear_create_restore_images.yaml
|
||||
|
||||
|
|
|
@ -31,4 +31,4 @@ universal = 1
|
|||
|
||||
[pbr]
|
||||
skip_authors = True
|
||||
skip_changelog = True
|
||||
skip_changelog = True
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
pre-commit # MIT
|
||||
netaddr # BSD
|
||||
mock>=2.0.0 # BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
|
|
49
tox.ini
49
tox.ini
|
@ -25,6 +25,8 @@ setenv =
|
|||
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
|
||||
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
linters: UPPER_CONSTRAINTS_FILE=/dev/null
|
||||
|
||||
sitepackages = True
|
||||
deps =
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
|
@ -43,9 +45,14 @@ deps = bindep
|
|||
commands = bindep test
|
||||
|
||||
[testenv:pep8]
|
||||
setenv =
|
||||
UPPER_CONSTRAINTS_FILE=file:///dev/null
|
||||
envdir = {toxworkdir}/linters
|
||||
deps =
|
||||
{[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run flake8 -a
|
||||
sitepackages = False
|
||||
|
||||
[testenv:ansible-lint]
|
||||
envdir = {toxworkdir}/linters
|
||||
|
@ -56,42 +63,18 @@ commands =
|
|||
ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-role-requirements.yml"
|
||||
python -m pre_commit run ansible-lint -a
|
||||
|
||||
[testenv:yamllint]
|
||||
envdir = {toxworkdir}/linters
|
||||
deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run yamllint -a
|
||||
|
||||
[testenv:bashate]
|
||||
envdir = {toxworkdir}/linters
|
||||
deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run bashate -a
|
||||
|
||||
[testenv:whitespace]
|
||||
envdir = {toxworkdir}/linters
|
||||
deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run trailing-whitespace -a
|
||||
|
||||
[testenv:shebangs]
|
||||
envdir = {toxworkdir}/linters
|
||||
deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run check-executables-have-shebangs -a
|
||||
|
||||
[testenv:linters]
|
||||
sitepackages = False
|
||||
deps =
|
||||
-r {toxinidir}/requirements.txt
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
-r {toxinidir}/molecule-requirements.txt
|
||||
pre-commit>=2.7.1 # MIT
|
||||
virtualenv>=20.0.31
|
||||
flake8
|
||||
-r {toxinidir}/ansible-requirements.txt
|
||||
commands =
|
||||
{[testenv:pep8]commands}
|
||||
{[testenv:ansible-lint]commands}
|
||||
{[testenv:bashate]commands}
|
||||
{[testenv:yamllint]commands}
|
||||
{[testenv:whitespace]commands}
|
||||
{[testenv:shebangs]commands}
|
||||
pip check
|
||||
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/tripleo_ansible/roles.galaxy' \
|
||||
ansible-galaxy install -fr {toxinidir}/tripleo_ansible/ansible-role-requirements.yml"
|
||||
python -m pre_commit run -a
|
||||
bash -c '{toxinidir}/scripts/detect-broken-symlinks.sh'
|
||||
|
||||
[testenv:releasenotes]
|
||||
|
|
|
@ -34,4 +34,4 @@ RUN easy_install {{ pkg }}
|
|||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -16,4 +16,3 @@ OVS_EXTRA="-- set Interface {{ mgmt_port_dev }} external-ids:iface-status=active
|
|||
-- set Interface {{ mgmt_port_dev }} external-ids:skip_cleanup=true \
|
||||
-- set Interface {{ mgmt_port_dev }} mac=\"{{ mgmt_port_mac }}\" \
|
||||
-- set Interface {{ mgmt_port_dev }} other-config:hwaddr={{ mgmt_port_mac }}"
|
||||
|
||||
|
|
|
@ -34,4 +34,4 @@ RUN easy_install {{ pkg }}
|
|||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -34,4 +34,4 @@ RUN easy_install {{ pkg }}
|
|||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -34,4 +34,4 @@ RUN easy_install {{ pkg }}
|
|||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -33,4 +33,4 @@ RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y pyth
|
|||
RUN easy_install {{ pkg }}
|
||||
{% endfor %}
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -33,4 +33,4 @@ RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y pyth
|
|||
RUN easy_install {{ pkg }}
|
||||
{% endfor %}
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -34,4 +34,4 @@ RUN easy_install {{ pkg }}
|
|||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -34,4 +34,4 @@ RUN easy_install {{ pkg }}
|
|||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -10,6 +10,8 @@ platforms:
|
|||
image: centos:7
|
||||
dockerfile: Dockerfile
|
||||
pkg_extras: python-setuptools
|
||||
volumes:
|
||||
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
|
||||
easy_install:
|
||||
- pip
|
||||
environment: &env
|
||||
|
@ -21,6 +23,8 @@ platforms:
|
|||
image: centos:8
|
||||
dockerfile: Dockerfile
|
||||
pkg_extras: python*-setuptools
|
||||
volumes:
|
||||
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
|
||||
environment:
|
||||
<<: *env
|
||||
|
||||
|
|
|
@ -69,4 +69,3 @@ done
|
|||
:> "$jobs_file"
|
||||
|
||||
flock -u "$lock_fd"
|
||||
|
||||
|
|
|
@ -33,4 +33,4 @@ RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y pyth
|
|||
RUN easy_install {{ pkg }}
|
||||
{% endfor %}
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
|
@ -33,4 +33,4 @@ RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y pyth
|
|||
RUN easy_install {{ pkg }}
|
||||
{% endfor %}
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
|
Loading…
Reference in New Issue