Commit Graph

39 Commits

Author SHA1 Message Date
Jonathan Rosser 2cf489900f Cleanup setup.py config
Change-Id: Id05d2c2ca482ad387b964507614951fa5d4b23f6
2022-04-04 09:56:10 +00:00
likui a252d5d3f9 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: I1ee02e6249042310bdcd2b01c3403594c0dd3b3b
2021-07-03 21:17:52 +08:00
zhoulinhui 0fb579a11d Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: Id585bae9c2766a033d7daaa286a435ae69873a04
2020-11-10 13:11:42 +08:00
melissaml 9287b0717a 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: Ia208319ef8e01e1ff780934d10917e98d6e97e7c
2020-04-14 16:22:07 +08:00
Ghanshyam Mann 20fce024a4 [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: Idc7067bd137afd55227415234b34a401fdbec77a
2020-03-01 16:01:11 +00:00
jacky06 b5f39edfa9 tox: Keeping going with docs
Change-Id: I5e8e1ed95b962d46324f26cf7614075ff6412acd
2019-10-24 01:23:07 +08:00
Dmitriy Rabotyagov 728666c9de 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: I4e800844332a878e8c0a73df256519de222dcb5a
Story: 2006105
2019-10-18 18:57:22 +03:00
melissaml fceb0d2f7b Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0df7b690d75ab2812d3bde8dec41f72d63fdaed5
2019-07-10 19:38:44 +08:00
Vieri 7037916858 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: Id666842a71e7b5ba3165e9ad5aac11ed4480e2e6
Closes-Bug:  #1801657
2018-12-01 10:58:22 +00:00
Doug Hellmann e1269a95bb 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: I6626db99852807bdea69bb9927a13aa09ff82aa0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:26 -04:00
Jesse Pretorius 65c245ec69 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: If1c1cbb25cef257c239b507581e27b9ba6c59d96
2018-09-07 14:53:42 +01:00
Jesse Pretorius 5b8b6250a5 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: I065ecc69cf36f38b496f3b4e25a62d2232c72b85
Needed-By: https://review.openstack.org/579371
2018-08-16 18:18:31 +01:00
Heba Naser af4772bdee 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: I1e616548dd7d87a9f139066bdb5fc1d8dd0d0560
2018-07-02 10:49:47 -04:00
Markos Chandras 70b7b59d5a tox.ini: Use common vars file for distibution installations
Change-Id: I3503a23b33689ef6912e7b1adcfc190261144fa3
Implements: blueprint openstack-distribution-packages
2018-06-14 16:01:15 +01:00
Markos Chandras 3ac7ae6ea7 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: I2435793b73e0a30131b4710b6e7d29dacbb7e6fa
Implements: blueprint openstack-distribution-packages
2018-05-25 17:27:25 +01:00
Jesse Pretorius ae6955ba7e 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: I14162d6d1c597cb3ad08618807385f35c0af6732
2018-03-28 10:14:09 +01:00
Jesse Pretorius 5d180b2d58 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: Ic816b36eb05c07a4c4c0e6197cb1e9be35e9b7f4
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:59:10 +00:00
ZhongShengping b6033c36bc 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: I2b63a4e156fb3e8c61fdc7bb4ae4826350db3d0a
2018-03-09 12:01:26 +08:00
Jimmy McCrory d9b4966128 Add MySQL connection SSL support
When 'heat_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: I8d582a5fe18b33592461f3ea23551c97720b8e7d
Partial-Bug: 1667789
2017-12-14 09:37:55 -08:00
Jesse Pretorius 44490a3aa9 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: I51e7f0d81da509d68fbf7d50145afb25ebec7c13
2017-06-04 11:20:50 +01:00
Jesse Pretorius 0d2f66fc55 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: I73f69b0f168ee7f8f7ea1a473102c12c3afdc878
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:51:39 +01:00
Cao Xuan Hoang 4edf463115 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: Id8b31fb4305aa3c6a9b82fbc23a34c33807dc726
2017-02-06 16:54:25 +07:00
gengchc2 b28126e9ae 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: Ie7b207c3d1e0ca519c55bd3784c203c6dd195b34
2016-12-06 09:36:12 +08:00
Jesse Pretorius 26fd346bc8 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: I65d176abbb74ffcfa64101e8cd220e8590336315
2016-10-19 07:42:45 +01:00
Jesse Pretorius 2b1c7cb68e Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I779245763f0e929557037d714f14f8da80e1f10d
2016-10-05 12:14:44 +01:00
Jesse Pretorius 49aee61750 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: I33ec02ad718bcb85c8ec70a58c2aad4ae2b00bc0
2016-10-04 11:41:28 +01:00
Jesse Pretorius 6b17fffaa5 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: I6a84d8d24353f1fe5eccd16ef2b573050122e1af
2016-09-28 08:32:50 +01:00
Travis Truman 4b4403c118 Ansible 2.1.1 role testing
Change-Id: I3192fd09069ff7747135823821c45f475d4a8e46
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 13:01:35 -04:00
Jesse Pretorius 3668e42adf 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: I9d411d66a365086e739dddfc56fdc78ab30c4712
Related-Bug: #1620849
2016-09-09 10:33:32 +01:00
Kevin Carter 159a3de1c4 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: I146e9a4e1d9afcfd423b66733b62fef922e32034
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:34 -05:00
Jesse Pretorius e21acdf80a 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: Iefce7256f3ac57906570cf91a74e3c7db37ec36f
2016-08-20 16:05:36 +01:00
Jean-Philippe Evrard 269d4fd241 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: Ia3e7af9da2e9b3726bc3f4205a5d1fd36f983097
2016-08-11 18:09:09 +01:00
Jesse Pretorius 4a4fe13577 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: I62c4e2a01cf6f5e6c03f67022ea946b420700f85
2016-07-25 21:42:09 +01:00
Jesse Pretorius ece0354858 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: Ia2d05ae4074da88aa909967a5f2285341181f1a3
2016-07-15 14:02:29 +01:00
Jesse Pretorius bb5f060024 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: Id8a36e35f48033d1994c10663ce2eeb7689e7ced
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:50 +01:00
Jesse Pretorius 2766dafbda 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: I0a7b544c49a8fa982990902071e67a40f3bd437d
2016-07-08 13:35:20 +01:00
Jesse Pretorius bba7cb1d44 Add reno scaffolding for release notes management
Change-Id: Ifb5643deec9289f27c0f7f7b1d1b7d4a3bd755b8
2016-04-09 19:20:23 +01:00
Travis Truman 57ab18ca3e Enable functional testing
This commit updates tests/test.yml to deploy rabbitmq, galera,
keystone, and heat in a functional test.  Note that we point at
a non-existent memcached server, but this can be adjusted to build
memcached if deemed necessary.

Note that we also have to install openstack-ansible-plugins in the
ansible-lint job as test.yml uses string_2_int filter which is
included in openstack-ansible-plugins.

Closes-Bug: #1553969
Change-Id: I650120b1605220b4d79c35db9c06c416b241da92
2016-03-15 14:20:21 +00:00
Matt Thompson 1b4683e2bb 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: Ic0bd764da1224e46cf88cac795b15771539647f9
2016-03-02 07:29:57 +00:00