The docs job is failing in https://review.opendev.org/671840 and thus
nothing is synced in from openstack-ansible-tests. The failure is due to
the removal of entries from doc/requirements.txt. Add those
to test-requirements.txt instead.
Change-Id: I21bcbde8acc8d4fd83b28026bcec33f388e69912
Using tox for requirements management requires in-repo
requirements files for all our repositories. Rather than
do that, we make use of the tests repo to capture our
common requirements and use this to install them.
This reduces our review requirement rate and simplifies
maintenance for us for the tox config. It also makes it
usable with 'Depends-On', which is marvellous!
The tox requirements definitions for docs/releasenotes
builds are left in-place as those are standard entries
across the community. If that changes at some point, we
can re-assess those entries too.
Depends-On: https://review.openstack.org/579208
Change-Id: Ibaf4aeeb60b0ceca8352cef87bf7c38529ca0fd2
With the upcoming changes to rebase onto the RHEL 7 STIG controls,
there needs to be a new solution for documentation that is easier
to manage and filter. This patch automates the generation of the STIG
control documentation in the following way:
* A Sphinx extension runs early in the doc build process that writes
all of the individual STIG control docs as well as ToC pages.
* ToC pages are now sorted by severity, tag, and implementation status.
* A giant listing of controls is easier to navigate now.
* Docs are generated from metadata in the /doc/metadata directory. New
documentation only needs to be added there. (Will explain this in
the developer notes in a subsequent patch.)
Implements: blueprint security-rhel7-stig
Change-Id: I455af1121049f52193e98e2c9cb1ba5d4c292386
This adds python packages required for SNI support to ensure that tox
installs the packages into the venv when running tests.
Change-Id: Ida0db3adb221de6a0b899bce8b4fa9338d677875
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to improve the
reliability and effectiveness of test execution, this patch implements
some changes to the tox configuration:
- The minimum tox version is increased in order to be able to use
constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
venv for the linters checks.
- Any proxy environment variables set on the test host are passed
into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
a new venv called 'ansible' and this environment is inherited
by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
so it doesn't.
- The Ansible role download will no longer ignore errors so that any
problems discovered will result in a failed test.
- The human readable logging callback plugin is implemented for
functional testing.
- The ansible test requirements are moved into tox.ini to ensure
compliance for requirements.txt/test-requirements.txt for the
global-requirements management contract.
- The ~/.ansible directory as a whole is not deleted. Instead only
the plugins and roles folders are deleted to ensure that zuul's
Ansible artifacts are left in-place.
- The ansible-lint version is updated to support execution against a
folder, and the test now executes against the entire role to ensure
that it captures all applicable files for lint testing.
This is a combined port of the following:
- https://review.openstack.org/323507
- https://review.openstack.org/338193
- https://review.openstack.org/332443
- https://review.openstack.org/338193
- https://review.openstack.org/339493
Change-Id: If42e739002e36669044a9396e233dbd382add4c8
This patch updates the docs for the security role to use the
openstackdocs theme and adds doc8 linting. This matches up with
OpenStack-Ansible's docs changes.
Change-Id: Ie8265bdaf8f8b91454766f5beba14645aabf77cc
A new release of flake8 is causing lint faiures. Our requirements
should match OpenStack requirements anyway.
This patch pins to the current master requirements from the
OpenStack requirements repository using global-requirements.
Change-Id: Ie21fbd15f9f563f71ab578cb61e82b2858d3ca73
This version of ansible is broken due to the following upstream
Ansible issue:
* https://github.com/ansible/ansible-modules-extras/issues/2042
Change-Id: If7b0722e72040c31b111afdb94027de6912a01c7
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Latest release of ansible-lint 2.4.0 has broken
role linter tasks by introducing a dependency on
openstack-ansible-plugins for all linting
While we may choose to adapt the linter tox env
in the future, for now we want to return to previous
linter behavior.
Change-Id: Ic61ab43be0a77d852ef61a2e7551a2b6780a70e7
This patch updates the tox.ini the same bashate exceptions as are
currently in the OpenStack-Ansible playbook repo.
It also ensures that the linters and all lint targets work
appropriately and normalises the tox.ini configuration to use
uniform formatting.
The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.
The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]
[1] https://github.com/ansible/ansible/issues/13563
Change-Id: I4f901b277e8a8eb96c8b74a103fca36b30b40cc5
Currently ansible-lint does not support Ansible 2.0, which was
released yesterday afternoon.
This is being worked on in:
https://github.com/willthames/ansible-lint/issues/75
This patch caps Ansible to < 2.0 to allow the gate checks to
succeed. This patch can be reverted once ansible-lint supports
Ansible 2.0 and above.
Change-Id: I4d7da77b0f42e33a4704fb44f1b993c0f1874647
This is a cosmetic change to bring our requirements.txt files in line
with other OpenStack projects.
Change-Id: I3937a7bff76edb2fda98a328f172d6435fa8e95d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>