Commit Graph

43 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov fe4bf78553 Define constraints file for docs and renos
Right now we are not using any constraints for docs and releasenotes builds.
This has resulted in docs job failures once Sphinx 7.2.0 has been released.

The patch will ensure that constraints are used an we should not face
simmilar issue again.

TOX_CONSTRAINTS_FILE is updated by Release bot once new branch is created,
so it should always track relevant constraints.

Some extra syntax-related changes can apply, since patch is being passed
through ConfigParser, that does not preserve comments and align indenting.


Change-Id: Id609280a58ce263f8860b24762c5670a1a421a3f
2023-08-17 16:32:19 +02:00
Marc Gariepy fd73df8e1e Cleanup setup.py config
Change-Id: I4b642a19ba6ae4f98dece434a905144e186c7f27
2022-03-31 10:39:09 -04:00
likui f5503147c3 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: Ifacd740e31ebbeaadc8e620cebd429f54c0dd3d4
2021-07-03 21:18:35 +08:00
zhoulinhui 4a0910086a Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I51cd982eec31b3f00bb9cfc038c06c8673a42041
2020-11-10 13:11:45 +08:00
melissaml f17c60c432 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: I1b8f09b5fce14b53d9538e32b7bd9e7c2615cf24
2020-04-14 16:26:36 +08:00
Ghanshyam Mann 13a32a42b2 [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: I919ba9dbf7fc51490c83e27b70a671ec3cf8fea5
2020-03-01 16:02:13 +00:00
jacky06 1f63c851d1 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: Ifab9126675be1d1a542d039b23aefcba7c25d796
2019-10-23 17:39:02 +00:00
Dmitriy Rabotyagov b7eaa12dcb 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: I887bd71b3304a9a9078cf60c48b02b871dd8146f
Story: 2006105
2019-10-17 19:48:58 +03:00
pengyuesheng d55808d12f Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I2c640243dc58f778a9ff0db37ddf90f1e3100db2
2019-09-26 10:42:34 +08:00
melissaml 8794f98e1d Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I8ea1ea89ba63ed043aaeb14472de9019fae116ea
2019-05-06 19:08:53 +08:00
huang.zhiping f793e0ed8a 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: I0a78b8a7a16b9f32a87a6a871cc4e0bc2d82e42e
Closes-Bug:  #1801657
2019-01-12 03:25:00 +00:00
Doug Hellmann 6d67b05655 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: Ib646288022289fac980b698faed03d4e686445bb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:30 -04:00
Jesse Pretorius 9156a8554a Clean up role tests
Now that we're using the general templates, we can slim down
the role test definitions. We can also remove tests which are
not being watched, or which are fundamentally broken. With
this we can also remove unused scripts/plays.

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.

Change-Id: If5bea7f1c27a8ea6d2d0f89f59019197f9204677
2018-09-07 14:55:07 +01:00
Zuul 2a35204c79 Merge "fix tox python3 overrides" 2018-08-28 06:09:24 +00:00
Jesse Pretorius 2d9a3351eb 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: I161c56e3bf6e48b8d1cde5f8e035ff5cc081bf02
Needed-By: https://review.openstack.org/579371
2018-08-16 18:18:48 +01:00
Markos Chandras 2af1b7a6c4 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.

Implements: blueprint openstack-distribution-packages
Change-Id: Ie6eeff541a319967715e619dcdc26177aec5be72
2018-07-23 17:29:14 +01:00
melissaml 6c7720f2bc 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: I58a334c36c010b254a1890e44a2b578dfdf7ff95
2018-07-23 19:18:22 +08:00
Heba Naser 416c23dd09 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: Ic21746968da2f0a091ed2d343561a4e98b8499c0
2018-07-02 10:53:40 -04:00
Jesse Pretorius f20af16e4a 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: I14d165dd9cb14eddd79e3a09715bcc8b8a41fa2e
2018-03-28 10:14:17 +01:00
Jesse Pretorius d93e8245cc 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: I8a32dcf4d7e0fc9aeda084bf4059f912387c1bb1
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:59:21 +00:00
melissaml b40093a7a7 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: If3d24a6539426242d156a35a876ea24107fcb8ab
2018-03-12 12:11:09 +08:00
Jimmy McCrory b775123f54 Add MySQL connection SSL support
When 'horizon_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.

Change-Id: Ie7e0e5f7fc89978126d0d735367d8ecf3e007cfc
Partial-Bug: 1667789
2017-12-14 10:26:37 -08:00
Jesse Pretorius ac44c4e1ec 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: I51c2dc4470700650f0c47cbfc2c7cd662353038d
2017-06-04 11:20:58 +01:00
Jesse Pretorius 92816ca972 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: I08de6a594629b5644a411a097d15f024dae7e33f
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:47:47 +01:00
Cao Xuan Hoang e80da542a0 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I8e5f49a4cf955206523c6ff49c672ad96dbc1e03
2017-02-06 16:56:30 +07:00
gecong1973 fe519cb41d 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: Ida435700aa4f9b0013081f52ab668ff82fed3de3
2016-12-04 10:28:22 +08:00
Jesse Pretorius 0a99054e93 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: Id7110afbcdc89ccc43000e364ff3b8d0921f3591
2016-10-19 07:42:55 +01:00
Jesse Pretorius 5feecac8f9 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Ic31c79609e366d0be0d9ce06cbe7a49b5d5efbe4
2016-10-05 18:17:33 +01:00
Deepak 3248bc36d2 Update test-vars.yml for repositories
Renamed in os_horizon role repo
Changed test-vars.yml to os_horizon-overrides.yml
Removed test-vars.yml

Change-Id: If3cf9b788fe8c20e2f2dff6fbd6cc2efba0c5efe
Partial-Bug: #1629284
2016-10-05 21:48:09 +05:30
Jesse Pretorius a8043593f2 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: Ia6d997a2a383699b727eebb2fb0f011053f30e71
2016-10-04 11:41:37 +01:00
Jesse Pretorius 22bfbea3f0 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: I5acf2bc37b7d9a38e6c3f964bac719421de42ec0
2016-09-28 08:16:55 +00:00
Travis Truman 09185c5bbd Ansible 2.1.1 role testing
Change-Id: I36c72b4930dceb730371290461c5cdd1c22b70ea
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-26 08:55:39 -04:00
Jesse Pretorius f3274370ba 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: Ie733bf9e40942cb4a302b351fee55c79aed98431
Related-Bug: #1620849
2016-09-09 10:34:03 +01:00
Kevin Carter df0293c5d2 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: Ic3a55c591aa6bce082dcfe4adcbc435918589a78
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:39 -05:00
Jesse Pretorius a55586862e 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: Ia1d611b8f5bbff7bdf59a77b86efad56464ad7dc
2016-08-20 16:05:45 +01:00
Jean-Philippe Evrard 0883726a8e 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: I00e891c159a77722f34f51fb0913c36b5b90563a
2016-08-11 18:09:15 +01:00
Jesse Pretorius 4dbde0e418 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: I3b14ec1524a0f32705b85835fe3d1eb4b181fc56
2016-07-26 07:38:09 +01:00
Jesse Pretorius e241c3761a 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: If07d6e55c65dd083626e8967ab8705050c171929
2016-07-15 14:02:40 +01:00
Jesse Pretorius ad77b184f7 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: I71feb1f32e3233693ada8f29c356f3a219c51934
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:58 +01:00
Jesse Pretorius 9a104b5158 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: I7b68b4ccaf655e14a56804e3a004bb5abd4ec455
2016-07-08 15:36:20 +01:00
Jesse Pretorius afcf852ae3 Add reno scaffolding for release notes management
Change-Id: I8553bf2cd84baf4a3e4ff83bd38d479de5398b0d
2016-04-09 19:20:32 +01:00
Travis Truman 9f41da7883 Enable functional convergence testing
One container running infra services, one running Keystone, and another
running Horizon.

Closes-Bug: #1553979
Change-Id: Id67a1d9a0bd6e87427f5b0755f69ea8f77441839
2016-03-14 12:53:48 +00:00
Travis Truman 8c21de8612 Implement base configuration for independent repository
Change-Id: I2226f825d2d5132331496ce2cf8aeda65d605dff
2016-03-02 09:39:02 -05:00