Commit Graph

41 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 19a539d8b7 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: Ida35a2a1e00284d4d3b6b27fa800ce532d09e9a8
2023-08-17 16:32:07 +02:00
Marc Gariepy 2ea4e53c6f Cleanup setup.py config
Change-Id: I3733d7115b8629195cc933328d2237c0a2ffb446
2022-03-31 10:38:19 -04:00
likui bcedd4e7c2 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: Ic6bf814245e150811c3edb33f94ab5105ce76c8a
2021-07-03 21:26:20 +08:00
zhoulinhui 4ab390adce Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I9a02e4515bca0b4c3b0c75ea8c0e96109afcb9cd
2020-11-10 13:11:27 +08:00
Ghanshyam Mann e061b4eb94 [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: Ie78e5073617351b81e32a57cacd09d7d212eb060
2020-03-01 16:04:03 +00:00
jacky06 9a7fe1efcd 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: Idcfd1c2add4027ea2aeed002fde64b7f369ac42b
2019-10-23 15:58:21 +00:00
Dmitriy Rabotyagov b633e2127b 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: Ifb430576505fa0d9d937fb30aa074f15a740d40b
Story: 2006105
2019-10-18 14:12:39 +03:00
melissaml be00665878 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I1231b4d0d0b0865eaf88d42ad3a4c69aa1c2a961
2019-07-17 11:27:53 +08:00
huang.zhiping ea262b41bc 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: I92dcc6339f6877f3edffe1c2ce919c5a38b47fa5
Closes-Bug:  #1801657
2019-01-11 06:09:35 +00:00
Doug Hellmann eb12edabc6 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: Ia15dfc6f5ec8b96acc19ffd8e20a3405703a9864
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:47 -04:00
Jesse Pretorius f327c0eede 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.
2. We promote the distro_install jobs, given that they are
   all now working.

Change-Id: Ie5d4221f84f30f0476b089cb5144c902b4b07f52
2018-09-07 14:31:52 +01:00
Jesse Pretorius b0ae03a3d8 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.

Depends-On: https://review.openstack.org/596885
Needed-By: https://review.openstack.org/579371
Change-Id: I8129a9d4dc4eebcc1423f856e6c1f6f80a23379e
2018-08-27 20:20:28 +00:00
Heba Naser 548456a50c 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: I971ed8aa240ead3652993474e518d7f7caae03e6
2018-07-02 10:16:18 -04:00
Markos Chandras 7ecdf08ce3 tox.ini: Use common vars file for distibution installations
Change-Id: Ib3255fedc2930309d2b93bac2122e3edd9cb249a
Implements: blueprint openstack-distribution-packages
2018-06-14 15:57:56 +01:00
Markos Chandras 7070497565 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: If6daa1bb784df46e83bbc118981240eb59a1409d
Implements: blueprint openstack-distribution-packages
2018-05-15 08:28:18 +01:00
Jesse Pretorius 52d47c9fec 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: I8e2601eea877501ee74cfe8e319250b46e9e8b08
2018-03-28 10:12:58 +01:00
Jesse Pretorius e7e2f2e794 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: Ie039c33e38320a9954b4ff8c72f14a89ffb9ba22
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:57:49 +00:00
ZhongShengping 30ef6ac129 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: I10cc5829c87cd59de605f6d4e393b1c13ee2e5aa
2018-03-09 12:01:26 +08:00
Jimmy McCrory 9f8713e5c0 Add MySQL connection SSL support
When 'aodh_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: I24f06aeacd92d6eead4100009301e0fb975bc552
Partial-Bug: 1667789
2017-12-14 11:52:35 -08:00
Jesse Pretorius d6277e2c4f 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: I5c18adfd3a2dae576c71d4cb3536e88493b9f0ca
2017-06-04 11:19:41 +01:00
Jesse Pretorius 416fadc9b5 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: Ie8dfa141cc05dd0f4a655dbbb60cdb23d48ec376
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:50:31 +01:00
Cao Xuan Hoang b0de88a7c4 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: If37b90cda14ec068f589ab1f1ada4605156dfcc2
2017-02-06 16:42:57 +07:00
gecong1973 9f1a362df7 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: Ifdfade0b43db76335e708c0b05efb6bb515b8c5b
2016-12-05 08:53:24 +08:00
Jesse Pretorius 377c93ad2e 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: Ic5a9cd6e515e2c3d3c8a396f2a739ba3ea59bc41
2016-10-19 07:41:30 +01:00
Jesse Pretorius db5ac8fdfe Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Ibcf89122939a5d70470a3fd8ad5d66c6185270b7
2016-10-05 13:01:37 +01:00
Jesse Pretorius ef7ebfbfa9 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: I94278592e4032ac421663f451a4a5f3c3925ce9c
2016-10-04 11:40:20 +01:00
Jesse Pretorius 53bb47125f 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: Ia677ee445239d2257c2b603256efd1fad6b67fae
2016-09-27 17:08:44 +00:00
Kevin Carter ed2ddcda31 Update testing bits for consistency
Change-Id: I8e86ad6117629638f8bc4013fefa889d577ff74e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 17:17:21 -04:00
Travis Truman 33b71bad0b Ansible 2.1.1 role testing
Change-Id: I055c4fe96a2d2b2e2d991b3bd7c0258a6c0534d3
2016-09-14 15:48:50 +00:00
Jesse Pretorius f02ee507b7 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: I44f7031abb7d30701e568d5f4ac1ebc9a9225c63
Related-Bug: #1620849
2016-09-09 09:29:25 +00:00
Kevin Carter 636a14d0c6 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: Ieab6bf4c2d600b994fa598a438742bf315ca5bf0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:34:25 -05:00
Jesse Pretorius 7d9061ef70 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: Ie8f4b3e7768e8e57f7f642cf1dbda73a488af1b3
2016-08-20 16:04:29 +01:00
Jean-Philippe Evrard eed6692ab1 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: I23259e91eb6a873bad72eec90e947027746a73b0
2016-08-11 18:08:31 +01:00
Jesse Pretorius a205887b8c 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: Ib66306db4ab9a07d0c18b383b8df1ab1ea24828a
2016-07-25 14:09:34 +01:00
Jesse Pretorius 2c8717b20f 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: I1da09595ddf23750fb9a5278ad2a29474cd1de55
2016-07-15 14:01:20 +01:00
Jesse Pretorius ffdca6b6f7 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: I2260b8591582dcc74f9aaa78dd693c661458620c
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:54:44 +01:00
Jesse Pretorius be9271b4f2 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: I10d5e61dd2d61aabe1f8a2b25262e71ccccfc8a7
2016-07-08 13:34:04 +01:00
Jesse Pretorius 84553c6eec Add reno scaffolding for release notes management
Change-Id: I3cc3537bc2120e6e40e97e37dc087714d194bbd7
2016-04-09 19:19:31 +01:00
Travis Truman 823cd2e92f Basic functional test of the aodh role
Ensuring that the aodh-api is responding to a basic request

Also adding human logging to the functional test to more
easily diagnose any testing failures.

Closes-Bug: #1553966
Change-Id: I93455c0eb300c29dd4dc512f43031c35f5c2c29c
2016-03-18 10:09:24 -04:00
Matt Thompson b3fa432192 Enable functional convergence testing
This commit updates tests/test.yml to deploy rabbitmq, galera,
keystone, and aodh for a functional convergence test.  Note that we
point at a non-existent memcached server, but this can be adjusted to
build memcached if deemed necessary.

Change-Id: Ic2d8afbf1f9d74bb0b1ff59ed731f089eab638c5
Partial-Bug: #1553966
2016-03-10 11:42:01 +00:00
Matt Thompson b44692c013 Implement base configuration for independent repository
This is a first pass at bringing in the necessary bits for the gate to
successfully pass.

Change-Id: I9bcf3057bec5f764de898cc02c60473a0f99d0a7
2016-03-02 07:28:08 +00:00