Use constraints for docs tox target and cap hacking

This patch fixes 3 problems to fix gate jobs in Stein.

1. In Stein the docs target started to fail when new release of
   neutron-lib appeared. This is because tox installs neutron and its
   requirements without any constraints. To fix this both the upper
   constraints and neutron requirements needs to be added to
   dependencies of docs target.

2. Patch adjusted to stable/stein and by using upper constraints in
   Stein another sphinx error comes up:

   ../config-services-agent.rst:70:Error in "code-block" directive:
   1 argument(s) required, 0 supplied.

   This also makes the docs build fail so a 'none' argument is added to
   the code-block.

3. Cap hacking in test-requirements.txt

   hacking as a linter is in global requirements blacklist and so is
   not in constraints. Recent release introduced new rules that
   required fix on master, on stable branches we should rather cap to
   the version that was in use during this release development.

Closes-Bug: #1856156
Change-Id: Iea61238f37fdf24c0264f96d104ee0b3b6aec8e2
(cherry picked from commit 07be793435)
(cherry picked from commit d1c4ba5810)
This commit is contained in:
Elod Illes 2019-12-12 11:14:10 +01:00
parent 57edfee5da
commit 34239888eb
3 changed files with 6 additions and 3 deletions

View File

@ -67,7 +67,7 @@ instead of using the ``kill`` command.
Kill scripts are called with two parameters:
.. code-block::
.. code-block:: none
<process>-kill <sig> <pid>

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=1.1.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
bandit>=1.1.0,<1.6.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0

View File

@ -146,7 +146,10 @@ commands = {posargs}
[testenv:docs]
basepython = python3
envdir = {toxworkdir}/docs
deps = -r{toxinidir}/doc/requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/stein}
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:linkcheck]