Commit Graph

46 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov badfff1346 Update tox.ini to work with 4.0
With tox release of 4.0, some parameters were deprecated and are ignored now
which causes tox failures. One of the most spread issues we have is using
`whitelist_externals` isntead of `allowlist_externals`


Change-Id: I0aa8f63d16d9008ca9c4384fd6e049b13838e097
2022-12-27 17:53:13 +01:00
Andreas Jaeger 1ba6cc04f9 Remove setup.* files
This repo is not using pbr and not publishing to pypi, the setup.* files
are unused.

setup.* files are used by UseDevelop in tox.ini but since there's no
code to isntall, we can change the switch to false.

Change-Id: Iab961aba8d1957aa40e7b71796e6078c8c20e5db
2020-04-27 18:13:49 +02:00
Andreas Jaeger c33db01ecf 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 */source/conf.py to remove now obsolete content.
- remove install_cmd, move constraints into deps,
  small cleanup of tox.ini

Change-Id: Ib88cbadb622163d41428b153739679cbba7c336d
2020-04-27 18:13:49 +02:00
jacky06 8425393737 tox: Keeping going with docs
Change-Id: I3ba94c6707d0b2992f9b78926fd6693e2e8b9a40
2020-03-31 21:23:02 +03:00
Ghanshyam Mann e3f31bea6e [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

openstack-ansible repos need few updates on requirements file.

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: Id1837ebda51efec613958ae92abdb0f449d04666
2020-03-02 20:23:12 +00:00
Dmitriy Rabotyagov 7132d760be 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: I0ea6477cb62773a1c9c82e77204c9bc72255a892
Story: 2006105
2019-10-16 11:26:26 +00:00
melissaml e3cc0d9d29 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ia9885316bfea7f97d254042356daba7e328fdaa3
2019-07-10 21:36:17 +08:00
huang.zhiping 8aa94263d2 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: I15b254299073e1c4437445f4f694643637b39558
Closes-Bug:  #1801657
2019-02-19 02:31:12 +00:00
Jesse Pretorius 8002ca2204 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 'upgrade' job, given that it's been broken
   all cycle due to the way the job executes and we need to
   regroup to figure out another way to do it.

Change-Id: I7d1f07878dba7d21aecd59fa75e9117b50b886e6
2018-10-17 16:23:13 +01:00
Doug Hellmann bb1cc63e05 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: I6cecf5cfbb40f930be4141e6113fa23d00652259
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:06 -04:00
Jesse Pretorius a35bb8cb4d 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: I3e4cb4d554dc6909a2d8b65d1710652a848672e6
Needed-By: https://review.openstack.org/579371
2018-08-16 15:24:36 +01:00
Nguyen Hung Phuong 3a0e1ebb51 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: I49f086554515284d5dc3af4c1b93fa272e0c35a1
2018-07-05 14:18:39 +07:00
Heba Naser 4566a36a53 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: I02aab2d946d440d2067bb56120729b2d24b396af
2018-07-01 16:52:52 -04:00
Mohammed Naser 859cbbba6c Fix SSL support
The problems at the moment with setting up SSL support with
Galera are:

- The keys are not used when creating users in the mysql_user
  Ansible module
- The private key must be converted to PKCS-1 in order to work
  properly with Galera.
- The MySQL client configuration is missing the settings that
  include the SSL certificates.
- Hard-coding the cipher causes problems for older clients,
  so we instead enable SSL and let the client and server
  negociate the ideal cipher.

This patch cleans up all of those issues, removes verbose
logging from the SSL job because we have ARA to gather all
the information we need and adds jobs for all the deployment
platforms that we support.

Change-Id: I27218c4086a50d238082895092fb8aa5e7fad807
2018-06-07 09:58:44 -04:00
Jesse Pretorius feba22bfaa 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: Ib127aa9cbf8672347f3734da7c363f5d65cc3144
2018-03-28 10:11:16 +01:00
Jesse Pretorius 0c7cc2592b 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: I1008be53ad9590311681ee72c678e067a65a97fe
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:55:56 +00:00
ZhongShengping 6f84bbf046 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: Ieb0460952f943b90deeec65d37d0a6026682c4a3
2018-03-09 12:01:25 +08:00
Kevin Carter ca054bd8f7 Tune-up the galera role for efficiency
The galera server role has quite a bit going on within it and because of
recent improvements in Ansible we can make better use of tasks, blocks,
facts, local facts, and organization. This change tunes the role up
following some of our better/more modern patterns allowing the role to
not only be more efficient but also easier to understand and improves
the roles idempotency.

Change-Id: If189a8192f22aafb168587361ca8e6903c918697
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-11-29 01:59:52 +00:00
Jesse Pretorius 0227dbe40d Separate greenfield and upgrade tests
In order to independently test a greenfield deploy
and an upgrade, with the upgrade's initial deploy
using the previous stable branch role, we seperate
the two tests.

This makes it a more accurate test without having
to do funky workarounds in the role required to
cater for two versions of galera.

Depends-On: Ic881bf3acf6fb6daf71611c26322f02fb8b0b9be
Depends-On: I5c88b2019c01b44193a5d0df9299ecce6de52f01
Depends-On: I8b09c2520c84bb43353b4c56bac157259f71b041
Needed-By: I2aca4721e4e023d315f3fcdae0f931dc960ef2be
Change-Id: I0c74e511cec01ed51101b873784c4a90a7302da6
2017-08-22 18:21:12 +01:00
Jesse Pretorius f272754df5 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: I50eb6e2adfd6daf725fbceab46c8a1de461e758d
2017-06-04 11:18:15 +01:00
Jesse Pretorius 0581614834 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: Id40ba2e8093741feb795959a9d8292fd73af887b
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:49:16 +01:00
Andrey eb5fc9c1e8 Added Galera SSL support
MySQL SSL connections allowed. Self-signed SSL bundle
created and placed to the deployment host, or user-provided
SSL bundle (CA, cert and the key) is used.

Change-Id: Ibac61d45cea67123fe61a6de4f906b4bd1949a34
Partial-Bug: #1667789
2017-03-30 09:42:38 -05:00
gecong1973 b8acdcfe88 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: I82433ebf27ebaf01301895ff27615a4296f1eb44
2017-02-06 12:10:24 +08:00
gengchc2 cd81b9b273 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: Iadf589dde4d36e3e5087cc0076ea8530f0281303
2016-12-06 09:22:36 +08:00
Jesse Pretorius 5556f4ebc7 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: I29d3b33ba8d7ccc0955921ed314a412bff71407e
2016-10-19 07:40:16 +01:00
Jesse Pretorius 66601280ff Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I16620739a0900c3b0b089e26a7c1acaddf95a7d0
2016-10-05 12:11:47 +01:00
Jesse Pretorius 4f93b0f188 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: Ie23df9760e068ddd117b72c123b518dc8fde5eb3
2016-10-04 11:39:08 +01:00
Jesse Pretorius 2b610bac65 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: I635914f58a095362788f4430b578e8d5f9009842
2016-09-27 16:00:50 +01:00
Kevin Carter 6029354891 Update testing bits for consistency
Change-Id: I5f449375e873c5358ac979bb6729873d2ab519d3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 17:10:10 -04:00
Jenkins 290dd8dc08 Merge "Ansible 2.1.1 role testing" 2016-09-13 09:51:51 +00:00
Travis Truman 23098ba15c Ansible 2.1.1 role testing
Change-Id: I61d7d438477e86d0a3b8ac294e35ba385d89c0e8
2016-09-12 15:57:42 -04:00
Jesse Pretorius 45f9c76b1c 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: I5aad324d7ac6535e35d635b58599f6a54436da5b
Related-Bug: #1620849
2016-09-09 10:10:38 +01:00
Kevin Carter a3bb3b73b9 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: I79d98754d50febdf9b8f39f412a2e9fa1c10c36a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:33:43 -05:00
Jesse Pretorius 1ac20470de 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: Iad37e0a7a762e87a284d97dba09483b953c51b5d
2016-08-20 16:03:31 +01:00
Jean-Philippe Evrard 15310f1391 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: Ib64c9e266469ada11d6534e07ad93ab8906af2eb
2016-08-11 18:07:59 +01:00
Jesse Pretorius 727189ff0c 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: Id23f9d262a1a18230f797c5aaecc76e627d0998a
2016-07-26 00:36:03 +01:00
Jesse Pretorius 9f47da61e4 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: I046226445257466da85f0f54872c26ccd91989af
2016-07-15 14:00:31 +01:00
Jesse Pretorius bcd2b9d5c4 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: I4c1be882868247a3a4d8795246f0b22dfa381837
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:53:53 +01:00
Jesse Pretorius 8e48a2ebf0 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: I44d9a6f75c582924c509c24acc070bbbb817aaaa
2016-07-08 13:33:16 +01:00
Jenkins dff733ddad Merge "Reorganize test playbooks" 2016-04-15 18:12:39 +00:00
Jesse Pretorius 4cff43f12d Add reno scaffolding for release notes management
Change-Id: I3949d724ce4e80001fbaa45683a6c8de8e08bb3f
2016-04-14 01:50:36 +00:00
Jimmy McCrory a37735c3fb Reorganize test playbooks
The following changes have been made to reorganize the structure of this
role's test playbooks, bringing them into line with other
OpenStack-Ansible roles:
  - move each playbook to an individual file
  - rename playbooks descriptively
  - define hosts and groups directly in the inventory file
  - include group vars required by containers
  - store extra variables in a single shared test-vars file
  - remove use of the openstack_hosts role
  - include callback plugin for human readable logging of test tasks

Change-Id: I4829e368003f58685cb96b7ee743255d00542187
2016-04-10 07:01:13 +00:00
Jesse Pretorius 5bcdd4b772 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: I077c5b79a95e78fd81c33382843273893d48bbb6
2016-02-12 10:47:56 +00:00
Jesse Pretorius 39e9e097d1 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: Ie1181799082b36d59dfaf4bf9446c06bd70696b7
2016-01-18 10:21:46 +00:00
Paul Belanger 729f9c6e0b Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: I91d401f0ff1945e65c7b434223e525fcd2f8454b
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:47:46 -05:00
Kevin Carter 25a9eb3901
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:23:50 -06:00