Commit Graph

30 Commits

Author SHA1 Message Date
Ian Wienand 001ad4d7b1 tox: drop test-requirements.txt
We have several tox environments that don't really share the same
dependencies.  Currently we put everything into test-requirements.txt,
meaning the linter environment gets testinfra and testinfra
environment gets things like ansible-lint it's not using.

Apart from being a bit faster not installing things, this is helpful
for restoring the ansible -devel test.  In that case, we have ansible
as a project dependency; when installing from git, ansible now
installs itself as "ansible-base" ("ansible" is the released pypi
package that incorporates collections).  So if we install ansible-lint
in the testinfra environment, this pulls in ansible ... and then it
breaks when tox wants to install our Zuul clone of upstream ansible
(you can't have ansible and ansible-base together).

Change-Id: I5f3fc93e6ddd611f319fa269e122ed576c9cb378
2020-08-25 08:41:44 +10:00
Ian Wienand 6091313667 Revert "Cap pytest to <6.0.0 to fix pytest-html"
This reverts commit 9946a85183.

The problem was fixed with pytest 6.0.1

  https://docs.pytest.org/en/stable/changelog.html#pytest-6-0-1-2020-07-30

Change-Id: I580a96e6eb65c272d9306af118b8f27ae8cff8c7
2020-07-31 08:35:10 +10:00
Clark Boylan 9946a85183 Cap pytest to <6.0.0 to fix pytest-html
We get:

  INTERNALERROR> AttributeError: 'tuple' object has no attribute 'rsplit'

When running pytest-html and this appears related to the recent pytest
6.0.0 release. Cap pytest to <6.0.0 to fix this.

Change-Id: I1379267598099f3ab53c217f15c57f825b8889fa
2020-07-29 13:29:49 -07:00
Ian Wienand ba45f251d1 Fix junit error, add HTML report
Specifying the family stops a deprecation warning being output.

Add a HTML report and report it as an artifact as well; this is easier
to read.

Change-Id: I2bd6505c19cee2d51e9af27e9344cfe2e1110572
2020-07-15 07:03:22 +10:00
Ian Wienand 52780440ff Update to ansible-lint 4.1.0
In a follow-on change (I9bf74df351e056791ed817180436617048224d2c) I
want to use #noqa to ignore an ansible-lint rule on a task; however
emperical testing shows that it doesn't work with 3.5.1.  Upgrading to
4.1.0 it seems whatever was wrong has been fixed.

This, however, requires upgrading to 4.1.0.

I've been through the errors ... the comments inline I think justify
what has been turned off.  The two legitimate variable space issues I
have rolled into this change; all other hits were false positives as
described.

Change-Id: I7752648aa2d1728749390cf4f38459c1032c0877
2019-06-06 22:13:12 +00:00
Ian Wienand 8a06d48c84 bridge.opendev.org: use Ansible 2.8.0 stable
Testinfra works with Ansible 2.8.0 now, so we can update
bridge.opendev.org to the latest version.  This also needs an ARA
update; bring it to the latest 0.16.4 release.

Update test-requirements so that tox/ansible-lint use Ansible 2.8.0
too.  See note inline about dependencies.

Note we replace import_tasks with include_tasks in handlers to address
this porting issue:
https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.8.html#imports-as-handlers

Change-Id: I7ed75d253857f86b68f67023af6897af4e1b4f50
2019-06-06 11:25:06 -07:00
Clark Boylan 16c255a4ca Cap ansible to <2.8 to fix testinfra
The ansible 2.8 release breaks testinfra because it does not include
paramiko anymore. Work around this by capping ansible below 2.8 until
testinfra is updated to bring paramiko along itself.

Change-Id: Ic33a08f4771207fc11af2f44104a3bcb5ec19bc5
2019-05-16 12:44:42 -07:00
Ian Wienand 9a1bb40578 Avoid testinfra 3.0.0
testinfra 3.0.1 is released now, but keep a historical note that 3.0.0
doesn't work due to not handling ipv6 addresses correctly.

See https://github.com/philpep/testinfra/pull/436

Change-Id: If67b3c3c03e4a775dd0413e8b401230762a22b85
2019-05-08 06:01:01 +10:00
Clark Boylan 690761d3b2 Cap ansible-lint at < 4.0.0
The 4.0.0 release of ansible lint adds a bunch of new checks that we'll
need to cleanup at a measured pace. Cap for now.

Change-Id: Ide87f1aa002482f0c7f8466e07af45ddf351eccc
2018-12-18 12:21:09 -08:00
Ian Wienand 526a423dd2 Add unittest for yamlgroup inventory plugin
This mocks out enough of the Ansible inventory framework so we can
test the group matching against a range of corner cases as present in
the results.yaml file.

Change-Id: I05114d9aae6f149122da20f239c8b3546bc140bc
2018-11-02 08:20:02 +11:00
Clark Boylan 7e777a63b5 Don't install testinfra 1.17.0
testinfra 1.17.0 has a broken wheel on pypi that attempts to install
importlib regardless of the python version. Unfortunately this breaks
under python3 (and possibly under python2.7) as this is a python2.6 only
dependency. Avoid this trouble by not installing that package version.

I've filed https://github.com/philpep/testinfra/issues/380 upstream to
see if they can fix this.

Change-Id: I5cdfb8467cbc62cf729a9070589f5dcf5c794234
2018-10-19 14:00:07 -07:00
James E. Blair 09b1ff4bc3 Add system-config-run-eavesdrop
Add a job which runs testinfra for the eavesdrop server.  When we
have a per-hostgroup playbook, we will add it to this job too.

The puppet group is removed from the run-base job because the
groups.yaml file is now used to construct groups (as it does
in production) and will construct the group correctly.

The testinfra iptables module may throw an error if it's run
multiple times simultaneously on the same host.  To avoid this,
stop using parallel execution.

Change-Id: I1a7bab5c14b0da22393ab568000d0921c28675aa
2018-08-30 10:25:23 -07:00
James E. Blair 19aebca3e7 Add system-config-run-base job
This adds a job which creates a bridge-like node and bootstraps it,
and then runs the base playbook against all of the node types we
use in our control plane.  It uses testinfra to validate the results.

Change-Id: Ibdbaf511bbdaee46e1335f2c83b95ba1553a1d94
Depends-On: https://review.openstack.org/595905
2018-08-24 08:50:01 -07:00
Ian Wienand b99c4c6fb0 Generate roles documentation
Since we're building out roles in system-config now, generate
documentation.  We look in roles/* and playbook/roles/* (follow-on
changes will split things up between the two).

Correct the reference names in the exim documentation to avoid
warnings and failure.

This also revealed a single unicode character in the exim readme
(which caused prior versions of zuul-sphinx to barf).  For fun, see if
you can find it!

Depends-On: https://review.openstack.org/#/c/579474/
Change-Id: I243a96bbd6d09560f8aa80b6345b90039422547a
2018-08-23 14:49:50 +10:00
Ian Wienand c3c5cb97af Update to latest docs PTI
We now put the documentation-only requirements in doc/requirements.txt
and call build-sphinx directly [1]; see

[1] https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation

Change-Id: I4ade203f1746409275d213f409603199ecb93878
2018-08-22 07:51:46 +10:00
Zuul 558e84857c Merge "Update to openstackdocstheme" 2018-06-28 04:58:41 +00:00
Ian Wienand 882b730fdf Update to openstackdocstheme
This modernises the openstack-infra documentation by switching to
openstackdocstheme.  Update dependencies as required.

To remove non-relevant stuff from conf.py, I have just taken the demo
file from openstackdocstheme and lightly modified it.

It seems later sphinx has included it's own ":file:" role which now
conflicts.  Change it it ":cgit_file:" in our documentation.  Remove
the custom header template which no longer applies.  Add the
post-2.0-pbr sphinx-based warning-as-error, which fixes the original
problem that I actually noticed that errors could slip through the
gate tests :)

Change-Id: Ic7bec57b971bb4c75fc839e7269d1f69a576b85c
2018-06-25 11:19:43 +10:00
Ian Wienand 19ed6637b6 Add a clouds.yaml checker
Load our various cloud configuration files into openstacksdk for a
basic sanity check of the configuration.

Change-Id: Ieedb3439533f3162d2b5cecca4b7fc07b631019e
2018-06-22 11:47:39 +10:00
Clark Boylan 73ef799d75 Don't use newer sphinx
Newer sphinx >=1.6.0 breaks theme templating. Avoid these problems
entirely by installing <1.6.0.

Example of resulting error:

  Exception occurred:
    File "/home/jenkins/workspace/gate-system-config-docs-ubuntu-xenial/.tox/venv/local/lib/python2.7/site-packages/sphinx/themes/basic/../basic/layout.html", line 108, in template
      {%- for css in css_files %}
  TypeError: 'NoneType' object is not iterable

Change-Id: Ibd7e932360c86be380184ccf4f415dbb8d70b757
2017-05-18 08:19:06 -07:00
Andreas Jaeger 86b5f9de9e Update to sphinx 1.5
Update for Sphinx 1.5 version.
Update all requirements with global requirements file for this.

Change-Id: Ie271c3d8f384176410ccfc66039edf8c0c47f960
2017-03-02 20:09:39 +01:00
Paul Belanger a08424387e Run ansible-lint on playbooks
This fixes the issues we have with our rename_repos.yaml file. We are
also skipping additional failures for now, which will be cleaned up in
a follow up patch.

Change-Id: I726535e195a292e3f2d457f0ed039d01bb96c66b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-01-12 15:32:46 -05:00
Andreas Jaeger 4139c901d8 Check number of meetbot channels
Check that we do not have more than 120 channels setup for meetbot.

Change-Id: Ib5b948c68691ec959d4826a2cdf28f3e50631e60
2016-11-02 20:45:06 +01:00
Ramy Asselin 14fd503aaa Migrate to puppet-openstackci openstackci::nodepool
Manage nodepool configurations using the common-ci solution
in puppet-openstackci

Remove nodepool.yaml.erb from this repo as openstackci::nodepool
will pull it in from project-config/nodepool/nodepool.yaml

Remove the tox nodepool environment and test dependency as it
has been migrated to project-config

The nodepool logging template file and associated tool that generates the file
will remain in this repo. In the short term, updates to nodepool.yaml in
project-config repo may require a related change in this repo to update the logging
configuration. In the longer term, nodepool will be updated to automatically
log image creations without needing a customized logging configuration.

Depends-on: I89207d100eb4b6bbb502a6ed38831f49e4b29096
Depends-on: I473a1b78acdb035eb379394a7ed5f771434dc942
Depends-on: I6b01ab7260a41927fff34b9b81b631ea2c933f22
Change-Id: I2b45a7145805368b1598d3a3e8a94f0e4eb8cf2d
2015-11-10 15:13:50 -08:00
Ian Wienand 6892b11603 Add nodepool config-validation environment
Add validation test for the nodepool configuration.  We get nodepool
directly from git so we can always handle the latest syntax changes
automatically.

Change-Id: I5d58648bca160d8afc81aae3d8daf0c7bd01c976
Depends-On: I250ea4959740cfc4650e9057caba09ae7bc25768
2015-03-19 00:55:40 +00:00
James E. Blair e1063b24e6 capitalize sphinx in test-requirements
Incorrect capitalization is not always wrong, but causes more round
trips with pip and is more suceptible to error.

Change-Id: Ic392338ef733ec609be4d320aec8b95be82ede2e
2014-09-05 14:08:12 -07:00
Andreas Jaeger aaf38f0501 Remove docutils pin
This was added to work around bug 1091333.  A new sphinx has been
released and so this is no longer necessary.

Change-Id: I9107884d964757a9154bdd1feb4ea6df4e9df43e
2014-09-04 06:16:56 +02:00
K Jonathan Harker 8ff2dbe1c3 Start running bashate on config (nonvoting)
Add bashate to test-requirements.txt, add a tox env for bashate,  and start
running it on config. Also convert devstack to run bashate via tox rather than
via run_tests.sh (the needed tox.ini changes to devstack have already merged).

Change-Id: I205d675ff231c0403dd135eacc8d57b45317859f
2014-09-02 15:50:33 -07:00
Andreas Jaeger 233016e6d5 Rename oslo.sphinx to oslosphinx
oslo.sphinx has been renamed to oslosphinx.

This patch does not touch tools/atc/email-stats.sh
since it will be removed soon.

Closes-Bug: #1277168
Change-Id: Ib446323e26e4a66cb045f7de9b6269cc137eb61f
2014-02-24 20:07:29 +01:00
James E. Blair ad39fbfbad Pin Sphinx to <1.2
1.2 was just released and has a bug that causes builds to fail with
the error:

  error: 'source_dir' must be a directory name (got `...doc/source`)

Change-Id: Iec882c2b0cf96d20828b57005fb336be2593ad6b
See: http://bugs.python.org/issue19570
and: https://bitbucket.org/birkenfeld/sphinx/pull-request/193/builddoc-shouldnt-fail-on-unicode-paths/diff
2013-12-10 08:36:42 -08:00
Monty Taylor 7409bde2b7 Remove pyflakes jobs
pyflakes is run py flake8. Patches have been submitted to all project to
ensure that they are using flake8 instead.

Change-Id: I541e47911e4dd79626646f66320d16ad0b2dc881
2013-09-23 18:29:18 +00:00