Commit Graph

42 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 66e9c65f18 Define constraints file for docs and renos
Right now we are not using any constraints for docs and releasenotes builds.
This has resulted in docs job failures once Sphinx 7.2.0 has been released.

The patch will ensure that constraints are used an we should not face
simmilar issue again.

TOX_CONSTRAINTS_FILE is updated by Release bot once new branch is created,
so it should always track relevant constraints.

Some extra syntax-related changes can apply, since patch is being passed
through ConfigParser, that does not preserve comments and align indenting.


Change-Id: I946664b8171ac2178562de347ea10477708f6809
2023-08-17 16:32:09 +02:00
Marc Gariepy 1d3c85d919 Cleanup setup.py config
Change-Id: I7c598b7e005579171b61e8b8b472a102b7be545f
2022-03-31 10:38:34 -04:00
likui 4a2c1ad75f 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: Ic96eddf78ff77a249f4afeeca28eec46dbfdb4e9
2021-07-03 21:14:35 +08:00
zhoulinhui 67ee6977cb Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I36cb01cda68c5cd60150020f5f758ec9ed1bdd63
2020-11-10 13:11:38 +08:00
Ghanshyam Mann 0f732b9e4d [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: Ib69a70c4cd36c940c9fed3294915c2aeda0cca5a
2020-03-01 16:00:35 +00:00
jacky06 ecf448d278 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: Id3d44b777565981f9152b82b543ff5149de4527d
2019-12-21 06:28:21 +00:00
Dmitriy Rabotyagov 9906ecd5bd 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: Ia22c65b101f8e4d0a6f671ef25424f8e7779d0db
Story: 2006105
2019-10-18 14:24:46 +03:00
melissaml 0fba87f983 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I81fbfa6baf0ca4382823899381b7ee378959dc04
2019-07-10 23:03:29 +08:00
Vieri d2e5ce53d2 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: I62890be07192cd9baad6da87a13142c494bf4fa9
Closes-Bug:  #1801657
2018-12-01 10:54:05 +00:00
Doug Hellmann 475583fa55 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: I650521242f1c18829bfdde5775d60742c1a096a1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:59 -04:00
Jesse Pretorius 07c862f28c 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: I9787bf1109b23ec4ad40287c5817508cae88087e
Needed-By: https://review.openstack.org/579371
2018-08-16 15:40:58 +01:00
Heba Naser 980af52135 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: I343ae894648e4357f4ad03ecd31a249ceee0dbb7
2018-07-02 10:25:05 -04:00
Markos Chandras 608a420408 tox.ini: Use common vars file for distibution installations
Change-Id: Ie2f3aa2397b8c5627aa97dbc1d2cb4a8d70e0794
Implements: blueprint openstack-distribution-packages
2018-06-14 15:59:50 +01:00
Markos Chandras 5e0a16e624 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: I3edabacc3978cd42988a6c0c04a011c22159b9fa
Implements: blueprint openstack-distribution-packages
2018-05-18 15:25:38 +01:00
Jesse Pretorius 81b5c0ab58 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: If149972b6b7ff9ea92ddc9d115697df3c5737ee6
2018-03-28 10:13:17 +01:00
Jesse Pretorius 9173f41311 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: I5f4d81e4edbe3cc616b9b3c753f2002c84155899
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:58:10 +00:00
ZhongShengping 273b9307f6 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: I496f18d1504033859ded9e9a9606c063a174eff9
2018-03-09 12:01:26 +08:00
Jean-Philippe Evrard bcc6ea58dc Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: Ie76b4452e58b3da82c8119b9bdb3bbb274e17137
2017-10-20 09:23:24 +00:00
Jesse Pretorius 743e78ac73 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: I8d159e213a3f3645d43a065033c4f22affec96cb
2017-06-04 11:19:58 +01:00
Jesse Pretorius 79d0f9c76e 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: Ie822e7b415897cbdde0bbbbe3f947847663b3944
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:50:47 +01:00
Cao Xuan Hoang faf5792b51 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: Ic19a9323606f690b7ec4bf7b26bbd23e8263619a
2017-02-06 16:48:10 +07:00
gecong1973 6891580e94 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: Idd9514d1d404089458dfeeca0d82ca81b8743240
2016-12-05 09:01:33 +08:00
Jesse Pretorius 34753dcac8 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: Ic1b2a5c80bf6011e53ac0df056dded60e555e130
2016-10-20 17:48:52 +00:00
Jesse Pretorius 0a8d5006c6 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I29e4163af37116409a128da589d655d165fb13ab
2016-10-11 11:38:12 +00:00
Jenkins 3da0d584df Merge "Shorten the gnocchi scenario name" 2016-10-03 19:33:45 +00:00
Travis Truman 54dd029056 Shorten the gnocchi scenario name
Too long a name causes tox to violently explode

Change-Id: I31bc11af47c19b7a69be9d5df971560ac87199ef
2016-10-03 11:46:35 -04:00
Travis Truman ea9b864412 Cleanup test-vars handling
The tox ansible-playbook run specifies the overrides
as extra vars so they need not be referenced within the
playbooks themselves.

Change-Id: Iba0a684250724cac74aeeeef5ec3eecbf0a14533
2016-10-03 11:39:20 -04:00
Travis Truman 5ebd74f40f Add func_gnocchi scenario gate test
This gate test omits installation of MongoDB
and uses gnocchi for all metric storage

Change-Id: I15fff275b3e5eaecb36a0da01c5aafc824c5a288
Closes-Bug: #1628952
2016-09-30 14:02:15 -04:00
Jesse Pretorius 8a6062a0ee 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: Ia5f46e3892ee029e41a3a178d3ce82832e7f9e03
2016-09-27 18:29:03 +01:00
Travis Truman f257d2e6ca Ansible 2.1.1 role testing
Change-Id: Ieb7ba32b32019c45c50e7795dcb87f0764c965f9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-21 12:11:42 -04:00
Jesse Pretorius 40850a7d67 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: I67323d66d9f6812bd1cfbfe982a931c4a5cd30ba
Related-Bug: #1620849
2016-09-09 09:29:56 +00:00
Kevin Carter 94c5551d26 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: Ic02298815d0611ad9714e3d5965149dcb1e45deb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:34:35 -05:00
Jesse Pretorius 6ee67feafd 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: Idb4a25bb927f453cd189f06d710670ef45913698
2016-08-20 16:04:45 +01:00
Jean-Philippe Evrard 2f9442370f 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: I68db83288a5c515e1b3cda97c73f4effe2f82d70
2016-08-11 18:08:40 +01:00
Jesse Pretorius 1a46237902 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: Iac3ca83a89de06490b7b6d3cd414825f5c2eb1ce
2016-07-26 00:37:15 +01:00
Jesse Pretorius a2d52421cf 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: Ia8e9560fd414a4d8eb5d2a015738ef5a2461ccce
2016-07-15 14:01:39 +01:00
Jesse Pretorius 5b2e9b983f 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: Iecd7f20edd499634bb6963f3f34e239154d2ed5a
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:00 +01:00
Jesse Pretorius 3baeefc81d 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: I54e77ab91bc34d7b23e3ea3525dbafa186c42003
2016-07-08 13:34:25 +01:00
Jesse Pretorius 39126f6bde Add reno scaffolding for release notes management
Change-Id: I2f0acfa1f94fc1926a0cb9ba3d5a356b655f495a
2016-04-09 19:19:39 +01:00
Travis Truman 5d96ac1d4f Basic functional test of the ceilometer role
Ensuring that the ceilometer-api is responding to a basic request

Also adding human logging to the functional test to more
easily diagnose any testing failures.

Change-Id: Idac9aea7141d6adc43ccfc35320b8dcf8b4a9109
2016-03-18 10:43:12 -04:00
Steve Lewis ea3bf5be30 Enable functional convergence testing
This commit updates tests/test.yml to deploy rabbitmq, keystone +
galera, and ceilometer for a functional convergence test.

We point keystone at a non-existent memcached server, but this can
be adjusted to build memcached if deemed necessary.

Closes-Bug: #1553977
Change-Id: I21d8a5548c43c96aaeaa14df6b22e28074318146
2016-03-09 20:46:11 -08:00
Jimmy McCrory e090a5523e Implement base configuration for independent repository
Change-Id: I66751a4255a0d37ce97f7ebaf15db57dbfa1d2c5
2016-03-01 09:43:48 -08:00