Commit Graph

45 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 95e6ca7705 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: If97768b2420ae969369ea1642d5578f3ef6f7565
2022-12-27 17:53:15 +01:00
Dmitriy Rabotyagov 8a7f0f754b Cleanup setup.py config
Change-Id: Ib5ce6b0416769f680c0c6cc7d2e3062d05f6ee40
2022-04-04 11:12:34 +02:00
zhoulinhui 6e949f8e8b Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I432cdc4615a812dba3ffe53bad3a1854c734435e
2020-11-10 13:11:27 +08:00
melissaml d6b6ec953a 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 noww
 obsolete content.

Change-Id: I7da1084c27ffbd2f085c4a1543527b72cdbf1d6b
2020-04-14 20:36:32 +08:00
Ghanshyam Mann b20e8a813c [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: I6d7fe5aa0b9f4857d9339948ca255db40680ed25
2020-03-01 16:04:31 +00:00
jacky06 5a42119c1c 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: I7a8cff93753a4eb30bc4b0ca67c44b9f7f6335fc
2019-10-23 17:44:07 +00:00
Dmitriy Rabotyagov d71b439ba2 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-17 17:03:49 +03:00
melissaml 1f47550a7c Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I1032668072bb65d4fb31a31c4949b555b317155d
2019-07-10 22:01:58 +08:00
Vieri b30a28b64d 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: I3dc33f7dbbbf691255ead0ccb1acaeb3e1ddb6c9
Closes-Bug:  #1801657
2018-12-01 10:57:02 +00:00
Doug Hellmann 5a965a17e7 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: I8b8562fb89fe5f39af28689f190f8beff9b54f4e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:32 -04:00
Jesse Pretorius 6645c5fc2e 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: I820ab89bac83a48646266f8a6eccd04f9fdfe35c
Needed-By: https://review.openstack.org/579371
2018-08-16 15:27:45 +01:00
Heba Naser 91708c2403 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: I7be5db8511f31524a38fccfa55836dab4f107da1
2018-07-02 10:01:34 -04:00
Jesse Pretorius 97a1c4534c 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: I5eb9cd47b128cbc7617279777c5da8b357795eae
2018-03-28 10:12:23 +01:00
Jesse Pretorius c0c5ca93cd 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: Ib6690d5a1cda3ca6d56752f910c24954e5711587
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:57:08 +00:00
ZhongShengping f9ecf6d01c 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: I8abc0c6a242dd23ce5cebf5bc33dce5e007f8327
2018-03-09 12:01:25 +08:00
Major Hayden 72ae290e10
Make role idempotent
This patch makes the openstack_hosts role idempotent.

Depends-On: Ie414d32d39fdeeedd77fe94b57a09ba344084ec1
Change-Id: Ie6537eeb923ae868b0ebc23057b34f0750781161
Signed-off-by: Major Hayden <major@mhtx.net>
2018-03-08 08:38:39 -06:00
Jesse Pretorius 0224464493 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: Icdeb79816c9917a29b0202df5aaf6611d7cd6113
2017-06-04 11:19:06 +01:00
Jesse Pretorius 9d88b9499c 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: Ie83136aacc9291dc9e76014c061b05f070142cbf
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:49:56 +01:00
gecong1973 9ff8983d00 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: Ibf6aee790902ed72f039649fd6881dede645cec1
2017-02-06 10:50:45 +08:00
gecong1973 ee031e3546 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: I82ba6957d49bb485260014d20d7c387a8d05dd9a
2016-12-02 11:33:59 +08:00
Jesse Pretorius c47c2211a0 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: I8ffa067ea362a4e6832137ee60c8b29932d64e9f
2016-10-19 07:41:05 +01:00
Jesse Pretorius 3f6484f87f Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I1744527b3b7c27cad8c64346699ace2ae1fee7c4
2016-10-05 12:12:46 +01:00
Jesse Pretorius beaccd0bc6 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: Ia02a707b6ab0a0be8879da242cac3f4bd02fa6da
2016-10-04 11:39:56 +01:00
Jesse Pretorius c6b8a66817 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: I3a509b4ca28900715be51df40b0b9a2d40e2bcf7
2016-09-27 17:08:37 +01:00
Travis Truman 69a6cd1cb5 Remove rolename var from tox test
The var is not used or needed any longer

Change-Id: I20bc128ff5d5d74ef57e261de2615f68e86ff681
2016-09-21 14:59:13 -04:00
Kevin Carter b7e31933af Update testing bits for consistency
Change-Id: Icf63286da793054bdc309cce58850097ba140a18
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 09:07:11 +00:00
Travis Truman 098cab2ae8 Convert role testing to use Ansible 2.1.1
Change-Id: Ia923ae1a3be0e4aea821c70f7bb0744c900aaa77
2016-09-13 12:58:29 -04:00
Jesse Pretorius 805f73a8de 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: Ic2e35b3c0af7d2fdc0b88f3073ac9ce8a966e3e8
Related-Bug: #1620849
2016-09-09 10:23:17 +01:00
Jenkins 94afa972a0 Merge "Updated to use the openstack-ansible-tests repo" 2016-09-06 18:38:08 +00:00
Kevin Carter 0c21ee93b0 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: I282ca90a3b25a01552dd3f0f325f8dc04d79b0d2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:34:09 -05:00
Kevin Carter ee409f4aac
Updated to use the openstack-ansible-tests repo
This change moves the role run and pre-steps to the tests
repo.

Depends-On: Ib2ec8840966aea574fef7387cee2ffabd597b4cb
Change-Id: Ib27bc814b14e3584450423d6a7f0e6842fd3fd98
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 19:28:43 -05:00
Jesse Pretorius f5bf34433a 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: I29453d81fd14996758160bfe84af93d0e34d39ed
2016-08-20 16:04:04 +01:00
Jean-Philippe Evrard 38382f5763 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: I4a1e1324c01e3d3407895f2af9bd2e1216141873
2016-08-11 18:08:18 +01:00
Jesse Pretorius 9fd7640c1d 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: Ib5efcbffee7b621c15aa252c05e0714dadc78962
2016-07-26 07:41:39 +01:00
Jesse Pretorius 0e243c9b06 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: Id246413cea378252f15ae5c97ae921ab1e09da2b
2016-07-15 14:01:01 +01:00
Jesse Pretorius 1f7d1e28ff 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: I253b359e815411fa0406d1fb397fb444b11fbc55
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:54:18 +01:00
Jesse Pretorius 0395dca79a 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: Iefe3cf0c1643b9b9a961b3bc2934ca6a770966b5
2016-07-08 13:33:40 +01:00
Kevin Carter ae02667b84
Updated the hostname generation
The change simply adds a more complete hostname within the
"/etc/hosts" file for all nodes within inventory which
ensures all hosts are reachable and have a proper host entry
for itself and all other hosts. Additionally the hostname
insert script has been made idempotent and tests have been
added to ensure functionality.

Partial-Bug: #1577245
Change-Id: Ib1e3b6f02758906e3ec7ab35737c1a58fcbca216
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-06-29 10:09:44 -05:00
Jesse Pretorius 2f43e7c6a0 Add reno scaffolding for release notes management
Change-Id: I0993a0af1adb7e952c203ce48d6e96b9d5aad3e6
2016-04-09 19:19:04 +01:00
Jesse Pretorius 7648d32009 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: I995bd1d365c978e475047d26744f19adf94be3ee
2016-02-12 12:18:14 +00:00
Jesse Pretorius 22b8d622a7 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: Id4d4e79db14f3c1c39eda8529b6be68800f84380
2016-02-04 11:23:32 +00:00
Paul Belanger cd1a8c0245 Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: If4ea603a1f354ecce670727cb5d2ec156bb89e83
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:33:13 -05:00
Jesse Pretorius ca5163f709 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: Idda19174cb55885dcf174a348be5b6750e352255
2015-12-15 09:33:59 +00:00
Jesse Pretorius 871abd62e5 Update run_tests to be more complete
This patch updates the run_tests convenience script to make it
execute all test environments using tox, but also ensures that
all the correct pre-requisites are in place before doing so.

Change-Id: I6fc9e93976d7bbee3fbac693990b76a5f4bfca01
2015-12-09 13:44:26 +00:00
Kevin Carter 335b5be62c
IRR for openstack_hosts
The change moves the role out from the main repo openstack-ansible
repository and into its own standalone repository.

Items within this change:
  * The role has been updated to ensure it runs standalone.
  * Tests added to the role within tox.
  * Functional tests added to the role that can either be run
    via the run_tests.sh script or using tox.
  * dev requirements have been updated for testing usecases.
  * Docs added to both the README.rst file as well as the docs
    folder.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-11-03 02:57:54 -06:00