95cec68a96
We need to specify doc requirements in doc/requirements.txt to avoid problems with the pip resolver [1] for the release team [2][3]. Removed specific doc requirements from test-requirements.txt. The problem here is that this repos haven't doc/requirements.txt file and by default in this case zuul will use the test-requirements.txt file to pull requirements [4]. This requirements file contains extra requirements like flake8 that collided with those allowed in our job environment and so the new pip resolver fails to install these requirements and the job exits in error. This project meet the conditions leading to the bug. /!\/!\/!\ Notice that I voluntarily added the doc directory even if no docs are generated here because zuul will try to pull this requirements from there first and the contained requirements are needed for reno but AFAIK the releasenotes dir is ignored by zuul. c.f [4] for further details. /!\/!\/!\ [1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html [2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html [3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html [4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36 Change-Id: I5cd2351ae4c813fac9a1909d518f8fa637807aaa
72 lines
2.5 KiB
INI
72 lines
2.5 KiB
INI
[tox]
|
|
minversion = 3.8
|
|
envlist = linters,molecule
|
|
skipdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = bash
|
|
setenv =
|
|
ANSIBLE_ACTION_PLUGINS={toxinidir}/molecule/roles.galaxy/config_template/action:{toxinidir}/molecule/ansible_plugins/action
|
|
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/molecule/ansible_plugins/callback
|
|
ANSIBLE_FILTER_PLUGINS={toxinidir}/molecule/ansible_plugins/filter
|
|
ANSIBLE_LIBRARY={toxinidir}/molecule/roles.galaxy/config_template/library:{toxinidir}/molecule/ansible_plugins/modules
|
|
ANSIBLE_MODULE_UTILS={toxinidir}/molecule/ansible_plugins/module_utils
|
|
ANSIBLE_ROLES_PATH={toxinidir}/molecule/roles.galaxy:{toxinidir}/
|
|
ANSIBLE_INVENTORY={toxinidir}/molecule/tests/hosts.ini
|
|
ANSIBLE_NOCOWS=1
|
|
ANSIBLE_RETRY_FILES_ENABLED=0
|
|
ANSIBLE_STDOUT_CALLBACK=debug
|
|
ANSIBLE_LOG_PATH={envlogdir}/ansible-execution.log
|
|
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
|
|
# 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
|
|
|
|
|
|
[testenv:bindep]
|
|
basepython = python3
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files.
|
|
deps = bindep
|
|
commands = bindep test
|
|
|
|
|
|
[testenv:ansible-lint]
|
|
basepython = python3
|
|
envdir = {toxworkdir}/linters
|
|
commands =
|
|
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/molecule/roles.galaxy' \
|
|
ansible-galaxy install -fr {toxinidir}/molecule/ansible-role-requirements.yml"
|
|
python -m pre_commit run -a
|
|
|
|
[testenv:releasenotes]
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
basepython = python3
|
|
whitelist_externals = bash
|
|
commands = bash -c ci-scripts/releasenotes_tox.sh
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
-r {toxinidir}/requirements.txt
|
|
-r {toxinidir}/test-requirements.txt
|
|
-r {toxinidir}/molecule/molecule-requirements.txt
|
|
commands =
|
|
# check only modified files:
|
|
python -m pre_commit run --source HEAD^ --origin HEAD
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# E265 deals withs paces inside of comments
|
|
show-source = True
|
|
ignore = E123,E125,E265,H238
|
|
builtins = _
|