
Molecule job fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1 The new pip is not supported on Python 2 / CentOS 7, so this change also upgrades to CentOS 8 images. This change also upgrades and fixes the ansible-lint job dependencies and configuration. [1] https://github.com/pyca/cryptography/issues/5753 Change-Id: I923020e7ec1f2ecbd7089096f22dd92fb36254a5
58 lines
1.8 KiB
INI
58 lines
1.8 KiB
INI
[tox]
|
|
basepython = python3
|
|
minversion = 2.0
|
|
# add docs to the list of environments once we actually have docs to generate
|
|
envlist = py36,pep8,molecule,linters
|
|
skipdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
|
|
passenv = *
|
|
sitepackages = True
|
|
deps =
|
|
-r {toxinidir}/requirements.txt
|
|
-r {toxinidir}/ansible-requirements.txt
|
|
-r {toxinidir}/test-requirements.txt
|
|
commands = stestr run {posargs}
|
|
whitelist_externals =
|
|
tox
|
|
|
|
[testenv:molecule]
|
|
setenv =
|
|
ANSIBLE_FILTER_PLUGINS={toxinidir}/tripleo_ipa/ansible_plugins/filter
|
|
ANSIBLE_LIBRARY={toxinidir}/tripleo_ipa/roles.galaxy/config_template/library:{toxinidir}/tripleo_ipa/ansible_plugins/modules
|
|
ANSIBLE_ROLES_PATH={toxinidir}/tripleo_ipa/roles.galaxy:{toxinidir}/tripleo_ipa/roles
|
|
deps =
|
|
-r {toxinidir}/requirements.txt
|
|
-r {toxinidir}/molecule-requirements.txt
|
|
changedir = {toxinidir}/tripleo_ipa
|
|
commands = molecule test --all
|
|
|
|
[testenv:ansible-lint]
|
|
deps = {[testenv:linters]deps}
|
|
commands =
|
|
ansible-lint -c .ansible-lint {toxinidir}/tripleo_ipa
|
|
|
|
[testenv:yamllint]
|
|
deps = {[testenv:linters]deps}
|
|
commands =
|
|
yamllint -c {toxinidir}/tripleo_ipa/.yamllint {toxinidir}/tripleo_ipa
|
|
|
|
[testenv:linters]
|
|
setenv =
|
|
ANSIBLE_FILTER_PLUGINS={toxinidir}/tripleo_ipa/ansible_plugins/filter
|
|
ANSIBLE_LIBRARY={toxinidir}/tripleo_ipa/roles.galaxy/config_template/library:{toxinidir}/tripleo_ipa/ansible_plugins/modules
|
|
ANSIBLE_ROLES_PATH={toxinidir}/tripleo_ipa/roles.galaxy:{toxinidir}/tripleo_ipa/roles
|
|
deps =
|
|
-r {toxinidir}/ansible-requirements.txt
|
|
-r {toxinidir}/test-requirements.txt
|
|
commands =
|
|
{[testenv:ansible-lint]commands}
|
|
{[testenv:yamllint]commands}
|
|
|
|
[testenv:pep8]
|
|
envdir = {toxworkdir}/linters
|
|
commands =
|
|
python -m pre_commit run flake8 -a
|