Commit Graph

43 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d3ef8b1256 Deprecate openstack-ansible-galera_client role
Since we moved all functionality of galera-client part to galera-server
role there's no sense in futher keeping and branching of client part.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/765777
Change-Id: I1623dbc80bee4eb7d889ee570d0ce27697b58cea
2020-12-07 12:41:44 +02:00
zhoulinhui 3f7b333d95 Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I0d712c73e870e01ed5683bc6f31de5b3100de622
2020-11-10 13:11:24 +08:00
melissaml ad5819c594 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: Ie7d39b0dec4b985078437904dc4bad2a913bf735
2020-04-14 20:15:21 +08:00
Ghanshyam Mann 5d9cc79e66 [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: Ib87205f047635a74353940afab0f13a5333064b2
2020-03-01 16:07:22 +00:00
Zuul 8524aa9649 Merge "tox: Keeping going with docs" 2019-11-21 16:43:37 +00:00
Dmitriy Rabotyagov 6397dd0e86 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I1ca77be73cda89776ccf8e5a1f48781261683103
2019-11-14 14:10:37 +02:00
jacky06 48ac69cd99 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: I4a931463119d0a48c83a9217b58868353170e5f3
2019-10-23 17:44:17 +00:00
Dmitriy Rabotyagov fda14fbe36 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: Ibed28b9dafee3bbba3dd7a2895f849ad2dde2f12
Story: 2006105
2019-10-16 11:26:47 +00:00
huang.zhiping 603d5bbf44 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: I25e96cae27f1695c1546342b7d66bd010f626616
2018-09-30 12:04:40 +00:00
Doug Hellmann 59375c08a5 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: I17ee4daa0b34ae08646fb3bf5423b61c49fdc358
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:02 -04:00
Zuul 547d76fe5a Merge "fix tox python3 overrides" 2018-08-23 03:22:30 +00:00
Jesse Pretorius 36e030c78f 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: Ief2081314f8aa1c827222982a6e61556443c90b6
Needed-By: https://review.openstack.org/579371
2018-08-16 15:22:39 +01:00
melissaml a36def29ac 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: I5182962c139dec0e68e7e5f920045ee10a58cbbc
2018-07-23 19:52:04 +08:00
Heba Naser 08d89cd056 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: I22e6e2801c9db34580ef57e2b7b9a9ea927d884d
2018-07-01 16:48:08 -04:00
Jesse Pretorius b731a115a3 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: I1f389f983db3ab33c294b69d026cbb21cf35fa8d
2018-03-28 10:11:07 +01:00
Jesse Pretorius f2abd0759b 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: Iad88cd2bda1cb77c6b25887bf98d1e4d069e8a3e
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:55:46 +00:00
ZhongShengping a8c030365e 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: Ic73779e19a795c0f76b599feecee7328f4bcd319
2018-03-09 12:01:25 +08:00
Jesse Pretorius cf4de7ae79 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: I83b0174f150dc6d7f06c6147d3e816bfaee342c1
2017-06-04 11:18:03 +01:00
Jesse Pretorius c6e2dcca0f 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: I5c59632f845305db9c858c03301c4744cee6171b
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:49:08 +01:00
gecong1973 139b6ea1d7 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: I1e91dcc2df52a20ec9eafeb2a655f39bb70e6bee
2017-02-06 11:17:15 +08:00
gecong1973 5d1b029aec 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: I66b236bc715aa1ceb0c06736a14d834db068c97d
2016-12-05 09:46:54 +08:00
Jesse Pretorius f69d771173 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: Ibbb65ec98f29e02acb3e63ece7fc288eef48e33a
2016-10-19 07:54:34 +00:00
Jesse Pretorius b399a4d925 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Ib16a03cca083db1b0ffb60035b1e8d75e8a7d211
2016-10-05 12:11:35 +01:00
Jesse Pretorius 8861e5a974 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: I5b20c57ef760e7cacf5c657668c0959efd0deac3
2016-10-04 11:38:56 +01:00
Jesse Pretorius 9bab6558f7 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: I22a0106dd9c62ba947c9ae4631c15a3da38e08b0
2016-09-27 16:03:27 +01:00
Kevin Carter 49fae29961 Update testing bits for consistency
Change-Id: I1490c0fc283bb030c52c2a6ebe476e76ff0ca3ca
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 16:58:13 -04:00
Jesse Pretorius acc80d2169 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.

Related-Bug: #1620849
Change-Id: I5854c50807befb7bea95613cdc9d61611550da01
2016-09-09 09:08:02 +00:00
Kevin Carter 2d53f4d222 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: Icb3f5904aadb22e8063bedfaa3c28c75f348b16e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:33:38 -05:00
Jesse Pretorius 7756934f5f 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: I45144acc0d499cd62b9be66e913340ef24cb08c9
2016-08-20 16:03:23 +01:00
Travis Truman f57f38e527 Ansible 2.1.1 role testing
Change-Id: Ic66e4c7d3d0cce1a1176deb31d1bb031d6e475cb
2016-08-12 01:11:17 +00:00
Jean-Philippe Evrard c5aaca848b 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: I2acdeeaff6af079f661b7bb5eadd7ba60123a4af
2016-08-11 18:07:54 +01:00
Jesse Pretorius c6b7724c00 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: I1a57ee702e659dd8d6718640ec21526d4fd529cb
2016-07-26 07:40:55 +01:00
Jesse Pretorius e99fae9713 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: I2c3943bde4ba44c77f40f3c42381aa140ec3a7be
2016-07-15 14:00:21 +01:00
Jesse Pretorius 7ad826b978 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: I6c86792b6a57691dd06e74a8fd3b20c392157279
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:53:00 +01:00
Jesse Pretorius 8068d14989 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: Icb5d505b81f0d989ced653b9fc82e24c363dfea1
2016-07-08 13:33:07 +01:00
Kevin Carter d394277b21
Update Multi-distro support for CentOS7
This commit updates the role to support Ubuntu 14/16.04 and CentOS7

Change-Id: Ieadcdd70e9b8271aee3880896255a5037f56567e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-15 21:59:40 -05:00
Jesse Pretorius 90182e3011 Add reno scaffolding for release notes management
Change-Id: Ic19065366bbe1da138c9ac554ea3db769ce57981
2016-04-09 18:18:57 +00:00
Travis Truman f423dbd912 Implement human readable logging for functional tests
This patch implements a callback plugin to provide human readable logging
for functional tests in order to aid the resolution of any functional testing
failures.

Change-Id: I05dfa0235cb367f6dc49002198a716832874b66a
2016-03-08 20:28:38 +00:00
Jesse Pretorius 12b72581a9 Update tox config and add bashate E006, E040 exceptions
This patch updates the tox.ini the same bashate exceptions as are
currently in the OpenStack-Ansible playbook repo.

It also ensures that the linters and all lint targets work
appropriately and normalises the tox.ini configuration to use
uniform formatting.

The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.

The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]

[1] https://github.com/ansible/ansible/issues/13563

Change-Id: I964c7dcc3c3be4debb405414401eface7664e6a7
2016-02-12 11:22:59 +00:00
Jesse Pretorius 4c5a0ad515 Revise all lint tests and add consolidated 'linters' tox environment
OpenStack-Infra has requested that lint tests be pipelined into the 'linters'
tox target in order to make more efficient use of nodepool resources.

This patch:

- Ensures that a complete set of lints tests is available in individual
  tox targets.
- Adds a 'linters' target which executes all the other lints tests.

Change-Id: If1349daf2b2712c63e6af2044f86e2b4bf880cad
2016-02-03 14:11:45 +00:00
Paul Belanger 36d17a5364 Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: I6785e5401e216a46a508cbdbc612a0668b15a199
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:34:28 -05:00
Jesse Pretorius 2731c03260 Merge bashate/pep8 lint jobs in common job
Instead of launching two separate build jobs in our CI infrastructure,
one for bashate and one for pep8, launch a single one. While the jobs
are short, the setup of the images takes a long time, so this is
friendlier to our CI infrastructure.

Use the pep8 environment as common lint target and merge the bashate job
into it.

This patch also renamed dev-requirements to test-requirements to bring it
into line with all other OpenStack projects.

Change-Id: I1bf8c9b604d753237c0c007b5bc81586b4437283
2015-12-15 09:54:37 +00:00
Kevin Carter ab36aed999
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:23:13 -06:00