Commit Graph

42 Commits

Author SHA1 Message Date
Jonathan Rosser b7de78ba5d Cleanup setup.py config
Change-Id: Ia040ee398a3436f376fec4afb9c8ab7c28a211fb
2022-04-04 10:41:03 +01:00
likui 87d0be496c 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: I8a0558b6f9ad80f144649bc9a8f5041c0595ee02
2021-07-03 21:16:40 +08:00
zhoulinhui 2e55321849 Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I421a5d5f3201af49854b99cfccb76c2b3080a52f
2020-11-10 13:11:38 +08:00
melissaml 354a8a5ba0 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: I272ca3391f3ddae2306d8c8513c624e976b26191
2020-04-14 16:31:42 +08:00
Ghanshyam Mann f02abef570 [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: Ica873dbdd7d5a82fdf1755afa9b113d9533beff4
2020-03-01 16:02:35 +00:00
jacky06 c071679de9 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: Ieebda9acba54174fbc3f6312897a4260a0a775ef
2019-12-21 00:39:42 +08:00
Dmitriy Rabotyagov 629a0e00cb 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: I9912fa1937def7cca5805f865206a3e9337c56e8
Story: 2006105
2019-10-18 16:13:28 +03:00
melissaml 066c4025f5 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ia06f067b5bdd9fc6c29ebd49c699d49a83d9634e
2019-07-13 20:28:24 +00:00
huang.zhiping 0295e9fa55 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: Idf52b7aeecc46b3ff14cf9e2b3a7c4401987c574
Closes-Bug:  #1801657
2019-01-12 03:19:29 +00:00
Doug Hellmann 6e7b0d6aa4 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: I5aacd82f70daf8e2b40fac01d01e511e0cf6a531
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:13 -04:00
Jesse Pretorius 10ade3d8e4 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 centos-7 distro_install job, given that it
   is now working.

Change-Id: I39058d02fabcc2801f3d3a8a5ac910668ad5c1f5
2018-09-08 15:30:18 +00:00
Zuul 2a2ed29790 Merge "fix tox python3 overrides" 2018-08-23 03:55:04 +00:00
Jesse Pretorius 19f9275647 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: I21d58858783b2c85e7f50e89d43ae58088913ae1
Needed-By: https://review.openstack.org/579371
2018-08-16 15:42:19 +01:00
Nguyen Hung Phuong d7ebe756a7 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: Ifd79dfdd9b5cd921f4175dbad6e27d6701372786
2018-07-05 14:13:37 +07:00
Heba Naser 1d0cbfb5a4 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: I2374264953e2ad2eb10994cdbbac6bfc20c9bec0
2018-07-02 10:36:39 -04:00
Markos Chandras 814f33ad2a tox.ini: Use common vars file for distibution installations
Change-Id: Ia422fdf0924cdb5df856fdc9d1c378939361a3ab
Implements: blueprint openstack-distribution-packages
2018-06-14 16:00:26 +01:00
Markos Chandras 07d79cd0a0 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: Iab155254fa3600e1b6b3e8992f7c1fdc6f710ed6
Implements: blueprint openstack-distribution-packages
2018-05-18 17:16:11 +01:00
Jesse Pretorius 47a2e5903a 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: If822729b14984ae2f654728ecf8ee528f023bffe
2018-03-28 10:13:49 +01:00
Jesse Pretorius 2be9de1733 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: I2ac255650f775668424d15ec40589d0c8ae565b2
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:58:49 +00:00
ZhongShengping f9b80ef558 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: I3cc90d0248b9df347cc9170d5bc67ebf24e1337a
2018-03-09 12:01:26 +08:00
Jimmy McCrory 270a8f8d73 Add MySQL connection SSL support
When 'designate_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: I0d8e3b685faa8d394fd56f8fbfd9b492d2c2cb60
Partial-Bug: 1667789
2017-12-15 08:09:46 -08:00
Jesse Pretorius ba56c9920d 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: I2ca63fb8de5f44dbaad900860846657ca4e0595b
2017-06-04 11:20:26 +01:00
Jesse Pretorius 9d5562983c 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: Ia4d7c9674d96bf1e9d4e89362892084c801f2e92
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:51:15 +01:00
gecong1973 b68ca8de1f Use https instead of http for git.openstack.org
TrivialFix

Change-Id: I2c7487a71002314d5834e8ba5917be2a602ae8fc
2017-02-06 10:56:42 +08:00
gecong1973 6313a9273a 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: Ic71e2bc211f72b38abca5ba5986752134be19095
2016-12-02 11:21:18 +08:00
Jesse Pretorius 962a49aeaf 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: I9cbfb4cc6d65a673d9adc843a5157ef7eb8a40ad
2016-10-19 07:42:17 +01:00
Jesse Pretorius 3216722789 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I4932a1bf8a425623937e0fd7a4dfd1654e381465
2016-10-05 18:55:06 +01:00
Deepak 0f286a07a9 Update test-vars.yml for repositories
Renamed in os_designate role repo
Changed test-vars.yml to os_designate-overrides.yml
Removed the test-vars.yml file

Change-Id: Ic3d5c3094d96cf0026564fcc8407157dfc87cec4
Partial-Bug: #1629284
2016-10-05 22:04:34 +05:30
Jesse Pretorius 9d0f1bca59 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: I2e572a0c8e158cfffaf415e09c7ab6a2e3de4536
2016-10-04 11:40:59 +01:00
Jesse Pretorius 32aff27542 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: I3a50b32bbb7bf724ccc446876755454b5cb24c89
2016-09-27 18:41:22 +01:00
Travis Truman 4c40547818 Ansible 2.1.1 role testing
Change-Id: I2db8435b0ae5b6004ebe1985c5606c0c39900a95
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 15:21:37 -04:00
Jesse Pretorius a900e8cd96 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: Ia8a9f927a6c86c5a1fca4faf4c08f57df334674e
Related-Bug: #1620849
2016-09-09 10:31:14 +01:00
Kevin Carter 70121c178e 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: I9e2a6eac052d175971bedd3e5f7a793ca3ab0934
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:19 -05:00
Jesse Pretorius 93e42673b2 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: I3785aa031abcfeb732c0a373775c479c004d4f21
2016-08-20 16:05:10 +01:00
Jean-Philippe Evrard 3f49d4a355 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: I395f70d69e6ef92782c5e99031360ffa357c6a92
2016-08-11 18:08:54 +01:00
Jesse Pretorius 00ecdbbf3c 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: I56839e936a35a96a829716eb4686bd7fd0927469
2016-07-25 14:10:13 +01:00
Jesse Pretorius 42f5615bc1 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: I8a0aaf157226f34712c40d5dcd091353fda0efc8
2016-07-15 14:02:04 +01:00
Jesse Pretorius 8541a47aa9 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: I7db85f8f2d069ae94e5e7a254ad7ab737b66647a
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:23 +01:00
Jesse Pretorius f8408838cc 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: Iaa4e552560a2e4b2a0f5b4f61f189f6dbb9864e7
2016-07-08 13:34:49 +01:00
Jesse Pretorius e99a0c1f73 Add reno scaffolding for release notes management
Change-Id: I9737a8bd143401ba76cb0d4d243d05c4473768bf
2016-04-09 19:20:06 +01:00
Jesse Pretorius f59db83194 Various configuration changes and task updates
This patch implements a bunch of changes for easier debugging and to
make the deployment more functional.

 - All passwords are removed from defaults. The role must fail to
   complete all tasks if no password is provided.
 - The Designate Pool Configuration uuid's are provided with
   defaults and the vars are added to the user_secrets.yml file
   for easy implementation in OpenStack-Ansible.
 - The designate.conf template has been re-organised to closely
   match the sample file provided in the master branch of the
   OpenStack Designate repository. This makes it easier to compare
   for changes.
 - The PyMySQL driver is used for all MySQL connectivity, as is now
   the general standard for OpenStack Services.
 - The designate_pool_manager database is now setup.
 - The test playbook has the RabbitMQ & DB setup pre_tasks removed
   for now. These can move out again once functional testing is
   working.
 - The test playbook's LXC dhcp range is reduced to 50 hosts in
   order to ensure no conflicts with the test containers and also
   provide room for growth.
 - Add human readable logging callback plugin to functional test.
 - Restructure testing to make it easier to work with.
2016-03-14 12:34:48 +00:00
Jesse Pretorius aa9ae16f9e Implement base configuration for independent role repository
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 a functional test.
 - An updated README, added LICENSE file and a CONTRIBUTING file.
2016-03-14 12:34:46 +00:00