Commit Graph

32 Commits

Author SHA1 Message Date
Jonathan Rosser 9e9a85c964 Cleanup setup.py config
Change-Id: I6c3de8e6b9ac1ef9a7deaabd0fa4decb085738d1
2022-04-04 10:35:13 +01:00
likui 8445103c60 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I5b4df1b67d4adab6c3cfcb1eb148c19b5abe251a
2021-07-03 21:15:53 +08:00
zhoulinhui 26f5180a9a Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: Ie31a1ef88a8ec144f6b01de845461874ecccbc12
2020-11-10 13:11:38 +08:00
Ghanshyam Mann e954ce2049 [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

Only update required is in tox to define common basepython as py3 os that
all tox env including [testenv:functional] will use py3 instead of py2.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ic5f94b7d54272a4b229ebd4760d031cb4fd2d7df
2020-05-12 07:39:50 +00:00
melissaml 927e9d7987 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Cleanup doc/source/conf.py to remove now obsolete content.

Change-Id: I7be2c386d677e9865583dd54a591302eaee8e7dd
2020-04-14 16:41:30 +08:00
jacky06 e686796004 tox: Keeping going with docs
1. Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
2. Remove the unnecessary blank line for tox.ini

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Depends-On: Ie837d376bb1a1d93367369d25140dd8a9d5ac14e
Change-Id: I1853f09568e7e713d0404d74be86f7629f155da5
2019-10-24 00:18:33 +08:00
Dmitriy Rabotyagov 10556a264c PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:

  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.

Change-Id: I53f6bcf2f6bd1caf2a020b96c3f59231054bdea6
Story: 2006105
2019-10-18 16:09:54 +03:00
tonybrad b9995c364d Change git to opendev
Change-Id: I1c436c9674526ee27aad66e272495a5a8a22cfc6
2019-05-21 03:51:52 +00:00
Doug Hellmann a61d3435ca fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I1d625e5fc726fad1a752c44e2032b3bdbbf7bb05
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:06 -04:00
Jesse Pretorius d12e71498b Use the TESTING_BRANCH env var for constraints
The TESTING_BRANCH environment variable is provided by the
run_tests.sh script and is derived from the .gitreview file.

This ensures that once the master branch becomes a stable
branch, the constraints from the stable branch in the
integrated repository will automatically get used once the
.gitreview file is updated.

To ensure that the required environment variables are present
we export them appropriately in run_tests.sh and modify the
tox configuration to pass them into the tox test.

Change-Id: I21e185ac2127146b33cbd4e67b15134eaa6bf69f
Needed-By: https://review.openstack.org/579371
2018-08-16 15:41:32 +01:00
Heba Naser eb17d26ebf Use tests repo for common role test requirements
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: Ib9a986352cf525d7d78ff3cfe1c63d74e30bff8d
2018-07-02 12:38:54 -04:00
Jesse Pretorius cce15b5a45 Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: Ic841db320227274c41ea0b92bba45e364f77726b
2018-03-28 10:13:35 +01:00
Jesse Pretorius 1240de4e5d tox.ini: Expose USER environment variable to execution environment
In order to allow the use of the environment variable which informs
Ansible which user executed the playbook, we pass the USER env var
into the environment that tox builds.

Change-Id: I39b986c46b2f7b5aad6273788a05f06c8c9cdd26
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:58:32 +00:00
ZhongShengping 05c5d70b4a Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Id1a435e7ab7e3c71f50daaf4f214734b8a248ce7
2018-03-09 12:01:26 +08:00
Jesse Pretorius 43b9497878 Ensure that role tests pin pip/setuptools/wheel
Currently the role tests use whatever versions of pip,
setuptools and wheel are already installed on the host.

When a version of these tools changes it often causes
problems for our testing.

This will ensure that we use a known good set of pins
which is maintained in the general SHA bumping process.

Change-Id: Id2467cf566cacce652ebd0a8cc338d10ec058cb7
2017-06-04 11:20:19 +01:00
Jesse Pretorius 2e7940ffc9 Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Change-Id: I4863fa5ee0e5c1b377bd4e75de891cc6dd20ef7a
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:51:08 +01:00
Cao Xuan Hoang 48412b6941 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: Ie6a1ec3cad1ff192535d054c0ce3cf58800ab651
2017-02-06 17:20:18 +07:00
gecong1973 8aa2114d59 Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:
     https://github.com/openstack-dev/hacking/blob/master/setup.cfg

Change-Id: Id1a105be2b8cfa7501c1058ee7d695551b485dfe
2016-12-04 10:20:41 +08:00
Jesse Pretorius 115b9d789e Use upper constraints for all tox targets
With the implementation of https://review.openstack.org/388087 all
tox targets may now use upper constraints.

Change-Id: I60b86d9c6853f6f512ce0e658a68f85b898fac27
2016-10-19 07:42:08 +01:00
Jesse Pretorius 1d6f47a9a0 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I1be5cedefff3bdd2fae541bf5383bbad3953eb24
2016-10-05 12:14:01 +01:00
Jesse Pretorius 8c0f6d0676 Remove install_test_packages variable
With https://review.openstack.org/381479 merged, setting this
variable in tox.ini via an extra var is unnecessary.

Change-Id: Ifd97b517c912d8d527bf6b55857795fbc9b0e2bf
2016-10-04 11:40:50 +01:00
Jesse Pretorius 67e34a1a9f Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: Ib7d3bff4c80a34508d701a940fa9b8f88f33678f
2016-09-27 18:01:18 +00:00
Kevin Carter 91ab7d7c0a Ansible 2.1.1 role testing
Change-Id: I359ee1fabfcc5f9efa45c614a5b5200630efb927
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 16:15:45 -04:00
Jesse Pretorius 6dbf70db45 Compress test execution logs
The volume of logs we collect in CI jobs are extensive. This
patch ensures that the logs collected are compressed to reduce
the space taken in CI systems.

PYTHONUNBUFFERED is also set to ensure that the console log
from the CI jobs is recorded in the exact order of execution.

Change-Id: I73b927ca288faabe2b1d8e15473ce7114de0873e
Related-Bug: #1620849
2016-09-09 10:30:35 +01:00
Kevin Carter e61bb1462f Enable log collection after functional testing
This change enables log collection within the gate so that further analysis
on gate tasks can be performed post build. This is very useful when
debugging problems.

Change-Id: Id9d7989fe7958f76de4d136d622a93c99e85747c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:15 -05:00
Jesse Pretorius 5aafad7d0e Make all linting tests use upper-constraints
As per [1] all linting tests can now use upper-constraints. This patch
removes all instances of the install_command override relating to lint
testing which were needed to negate the use of upper-constraints.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: I49f7ca0e9d5f9feabf7d3bb16a211ea09bc32fe7
2016-08-20 16:05:02 +01:00
Jean-Philippe Evrard d087af582c Include ansible commands for ansible linting
The plugin repo needs to be cloned for ansible-lint to
understand ansible plugins. The commands currently
reside in tox.ini under the ansible section and are not
currently included. This commit fixes that error.

Change-Id: I03a3afc01b79c0893573c40afe1f56d8becd66cc
2016-08-11 18:08:50 +01:00
Jesse Pretorius 8dbf55ad85 Ensure that doc linting is included in the linters test
The 'docs' tox target executes the doc8 lint test which may result in
failures when testing documentation builds, but OpenStack-CI does not
execute that tox target.

In order to ensure that we catch all standard documentation syntax
errors and prevent them from merging, this patch includes the docs
target in the 'linters' chain of tests.

Fixes for any failures which result from executing this test are also
included in the patch.

Change-Id: I8ff7433642a4d66972659425f6d8d827db3d3b8e
2016-07-25 14:10:06 +01:00
Jesse Pretorius 44774f288b Use plugins repo version of the human_log callback plugin
With the implementation of https://review.openstack.org/321331 the
human_log callback plugin is now part of the plugins repo.

This patch removes the retrofitted version in tox in favor of using
the version from the plugins repo instead.

Change-Id: I5a38d9792f7c7129d1eaebe1045dca1fd2fd6a24
2016-07-15 14:01:56 +01:00
Jesse Pretorius 2628064841 Implement doc8 checks for docs
In order to prepare for the move of detailed configuration
content from the install guide to the roles, doc8 checks
are being implemented in the roles to ensure that any new
content submitted is properly checked.

Change-Id: I06c93f4ab92919a0a08cf2eb98d6f6895f89976d
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:16 +01:00
Jesse Pretorius 9b6d123c50 Update tox configuration
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: Id08a0769eb227d85b0fe8ed9c80723be08649678
2016-07-08 13:34:42 +01:00
Jimmy McCrory fdaaacaca8 Implement base configuration for OpenStack-CI
This patch includes the following changes to enable OpenStack-CI gate
testing and to allow the role to pass a basic convergence test:

 - Base configuration for OpenStack's CI Infrastructure.
 - Base documentation build configuration.
 - A Vagrantfile for local testing.
 - A base test configuration in order to execute the standard tests.
 - Added a CONTRIBUTING file.
 - Add reno scaffolding for release notes management.
 - Correcting name of handler to restart services in install tasks.
 - Define ``cloudkitty_galera_password`` and
   ``cloudkitty_user_password`` in test variables.
 - Define default ``debug`` and ``cloudkitty_service_region`` variables.

Change-Id: I7bcc8c589d506d8b71eb08fc87861a4c31a6e947
2016-07-01 09:35:24 -07:00