Commit Graph

41 Commits

Author SHA1 Message Date
Jonathan Rosser b9da0884b7 Cleanup setup.py config
Change-Id: I0a519a5de81b2f83a342bd806e5fd4fc71aa41d4
2022-04-04 10:16:27 +01:00
likui 5f57e71ed8 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: Ie0ecf45a31353957132e743a05a794be967bb124
2021-07-03 21:13:53 +08:00
zhoulinhui ac0bf98715 Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I2e5663aba7939b6dd4f34e5751e1e87b788b6801
2020-11-10 13:11:35 +08:00
Andreas Jaeger 5a691d380d 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.
- Enable warnings for docs build

Change-Id: I7ed46d3303795d036dd89268f1077e10d9ddd948
2020-04-13 18:42:13 +02:00
Ghanshyam Mann eb02454471 [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 baspython 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: I13f1abb05bb473b90813fa50eadb618acc42a430
2020-03-01 16:00:53 +00:00
jacky06 2410e624d1 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: I55e16bdbf5388c30ded812c0511f56a59c59698b
2019-10-23 15:57:03 +00:00
Dmitriy Rabotyagov 1c6095ff02 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: Ib69ba147028abcc64f69d31aa5756e5b832d54aa
Story: 2006105
2019-10-18 14:16:01 +03:00
melissaml 41f5b60ca4 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ic25064fc9c6e34803bc33531113e89987f43072f
2019-07-10 21:17:43 +08:00
huang.zhiping 7b58a52da0 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: Ibcfa628141ecdd8cd604cc1837bbaa2b7efcc8cb
Closes-Bug:  #1801657
2019-01-12 03:16:15 +00:00
Doug Hellmann dfe5fc9acf 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: I457cc6a68aca534ed2b9a349c56fd8ccf91ca4e1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:51 -04:00
Jesse Pretorius 2d86350944 Clean up role tests
We do the following:

1. We remove the 'ssl' job, given that the person working on
   that is no longer doing so, and no-one else has picked up
   the work.
2. We promote the distro_install jobs, given that they are
   all now working.

Change-Id: I7a997360fe8b03d1eac52e7c1a8d45c38d194357
2018-09-07 14:34:29 +01:00
Jesse Pretorius 7c50d131e0 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: I4e452fc869d7f63fa1648dda2041ca3fca47da3f
Needed-By: https://review.openstack.org/579371
2018-08-16 15:32:09 +01:00
Nguyen Hung Phuong 4d22fa2608 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: I479a4e5d5a8bd40f8fd36f621aa9fdb5b74fe336
2018-07-05 14:16:30 +07:00
Heba Naser b12fe46841 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: Ia9c8775429e5adbc20fa05da8b17fe91cef6fd6b
2018-07-02 10:20:32 -04:00
Markos Chandras e5babe52a8 tox.ini: Use common vars file for distibution installations
Change-Id: I871ba34b18f2cd7162ba7ab5fc91331f911a5d79
Implements: blueprint openstack-distribution-packages
2018-06-14 15:56:54 +01:00
Markos Chandras c9135f8b34 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Change-Id: I1c2b4ad14fb40ce3958ed197115ccf45468544c6
Implements: blueprint openstack-distribution-packages
2018-05-15 11:42:58 +01:00
Jesse Pretorius a5b862aa99 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: Id7215ab417e1250987fecff47dc35a499e367775
2018-03-28 10:13:08 +01:00
Jesse Pretorius 6839ec02cc 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: I0ad5ddb64dcda7987df00c21695ccc9a8e64e44f
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:57:59 +00:00
ZhongShengping 0eb21fe356 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: If02415b85c8a3b72690584caec7d5e5ce77c59fd
2018-03-09 12:01:26 +08:00
Jimmy McCrory 5141c18209 Add MySQL connection SSL support
When 'barbican_galera_use_ssl' is True, use an encrypted connection to
the database using either a self-signed or user-provided CA certificate.

A new non-voting test has been added to verify that the role remains
functional when enabling SSL features.

Partial-Bug: 1667789

Change-Id: I10c578f32c54138cac87ad42adc0ab38d62da9a6
Depends-On: I95cc994df5118fce7ce588fc0bff979bc283a6f3
2017-12-13 16:04:27 -08:00
Jesse Pretorius bc8f5eabaf 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: I3bd2d6623dcaeb706ca640af5ed683cb187fc3e6
2017-06-04 11:19:50 +01:00
Jesse Pretorius 50d98d814f 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: I45f37bee4902c70299e19184b925375666a3f8f9
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:50:39 +01:00
Cao Xuan Hoang bdc8f5e5a5 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I1404ad9aea4327415198dcca814be121f7764a41
2017-02-06 16:45:58 +07:00
gengchc2 010c9c2b82 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: I2dd483fefd7f813e94c37f5f35dbea6edb6e12b2
2016-12-06 09:40:44 +08:00
Jesse Pretorius 8e29ac43f3 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: Ifebfd3cd12e179e117dd8b65250bee444b820616
2016-10-19 07:41:40 +01:00
Jesse Pretorius 79d1cb82c1 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I393ae90fe9abb5e60482021ed4708794e72b9b32
2016-10-05 12:13:23 +01:00
Jesse Pretorius 8d194afe06 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: Id02bbee199bd0d42ef3dad3687b1f1675f21ad78
2016-10-04 11:40:30 +01:00
Jesse Pretorius 1600d20247 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: I83c7b8bf6be68ca2afe80004aa51d564e06a647d
2016-09-27 17:55:47 +01:00
Travis Truman d2a354c3f5 Ansible 2.1.1 role testing
Change-Id: I765f4c4bccaf2c66cafd6fe70f12c8c4e6e702bf
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 13:06:53 -04:00
Jesse Pretorius 2bf4c78088 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: If85a4d7fe58bfeef99e68714bb2a3bbc94ce7a67
Related-Bug: #1620849
2016-09-09 09:29:41 +00:00
Kevin Carter 48f84ba36d 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: I3a91bb057980879a3ead9d9fb04db22832aeba1f
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:34:30 -05:00
Jesse Pretorius 10b35bec59 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: I6f5a9579e1280495b70a77d38da8a1feb4e10ba9
2016-08-20 16:04:37 +01:00
Jean-Philippe Evrard e0e09643d0 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: I74ab77e4dc6dc1179e748c17c71002282c3977f3
2016-08-11 18:08:35 +01:00
Jesse Pretorius 3aec522dc8 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: I7973b3cd010563289ce01cc36094e0a58ca56870
2016-07-25 14:09:42 +01:00
Jesse Pretorius 013fae9490 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: I221962ae5fa7244769df32d83de324ab89285e2f
2016-07-15 14:01:28 +01:00
Jesse Pretorius efbe6f7b20 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: I1c4b15b27efe1f01073d8832bba1da7ee7ba7d19
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:54:52 +01:00
Jesse Pretorius 2e83f7e389 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: Ie37a8124f5069908d4ea86a903ca5d97fe3f9998
2016-07-08 15:33:42 +01:00
Jenkins 6ae5d108ad Merge "Enable functional convergence testing" 2016-04-13 09:34:18 +00:00
Jimmy McCrory 37d90c5dd9 Enable functional convergence testing
This change adds variables and tasks for enabling developer mode to
allow for installing barbican without a repo server, moves the tasks
creating the barbican rabbit virtual host and mysql database from the
role to a playbook, and adds functional convergence test playbooks to
deploy rabbitmq, galera, keystone, and barbican.

The barbican.conf template has been updated to make use of the deployed
rabbit and galera servers and all other templated configuration files
have been updated from the current head of master.

Change-Id: I2716fbe6a5dbad2a3b7ce6e406098e463cf7d943
2016-04-12 11:27:15 -07:00
Jesse Pretorius 8297406d43 Add reno scaffolding for release notes management
Change-Id: Id3f7324a77e323369bed1a38697365535d992e97
2016-04-09 19:52:36 +01:00
Jimmy McCrory f26e994bf9 Implement base configuration for OpenStack-CI
This patch includes the following:

 - 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.
 - An updated README, and added a CONTRIBUTING file.
 - The extras folder and files have been updated to match current
   conventions.

Change-Id: Ibc83d81de14eec533afae5b8c2cf0d07668d3ba0
2016-03-22 12:12:44 -07:00