Commit Graph

44 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 815f957b1d 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: Ib7d2fff82a0970424948c33628c388aeed1e08fe
2023-08-17 16:32:13 +02:00
Marc Gariepy 49e3512a80 Cleanup setup.py config
Change-Id: I03e390a3ae34c26a5fe9fc677c05ee6b74107af8
2022-03-31 10:38:58 -04:00
likui 7a66bd6b59 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: Ifcfc4d8ca048651feed2043de39c0dfbc8e8d2da
2021-07-03 21:40:56 +08:00
zhoulinhui 95fb8b334a Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is deprecated and TOX_CONSTRAINTS_FILE is
the new environment variable name that replaces it [1].

This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
[2] https://review.opendev.org/#/c/722814/

Change-Id: If16179cfeb63c2facbabfb97c452a8c6ffff7530
2020-11-10 05:15:52 +00:00
melissaml c3d416b9c4 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: I75cbbde0c0f5fa391d76eac3fea06036b3b836f1
2020-04-14 16:39:15 +08:00
Ghanshyam Mann e3c8642d8d [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: I8924a44ca33275e326a48b4cb6db9314d2c7adfd
2020-03-01 16:15:26 +00:00
jacky06 73f0ed5c4b 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: If0d8491ef25c1ed1631f9742ebc9656cea864119
2019-10-23 17:40:26 +00:00
Dmitriy Rabotyagov e4babdd7c8 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: I26fce963eb6649fd59a8636a80329db15667c73c
Story: 2006105
2019-10-18 16:20:01 +03:00
melissaml 73551555f8 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I25adc54c93e699e369ca36eef2d83467ca08221d
2019-07-10 21:26:45 +08:00
Vieri 3f8c2ee324 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: I7a526b86f10a871630a6362827d4dcb80ea58342
Closes-Bug:  #1801657
2018-12-01 10:55:21 +00:00
Doug Hellmann 971389ca41 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: I74b1f93f74f49bfeca0fc56e74ca8ed8e7083985
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:23 -04:00
Jesse Pretorius b8a64f6133 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.

Change-Id: Iaf3d6226e72ba542f06b9805c4e017904f786029
2018-09-08 17:26:47 +01:00
Jesse Pretorius 2d8475e602 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: I184e45317b71ae25956676a0d0d6ef744d9e3fad
Needed-By: https://review.openstack.org/579371
2018-08-27 20:19:51 +00:00
Heba Naser 92a630b9dc 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: Idf0f9dbce15b2c5d7af19fc7f021e58125c10035
2018-07-02 10:41:58 -04:00
Jesse Pretorius c6a34a379b 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: Id63cfb16906b7eeeafc32a6539e988926c39d208
2018-03-28 10:13:58 +01:00
Jesse Pretorius cf7fc31583 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: If9ac624eec457aac34bd26a1025b2e008b350dda
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:58:59 +00:00
ZhongShengping cd5d7a03af 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: I4e1dbb40971eba6ec464bc577138947cd4c7ac99
2018-03-09 12:01:26 +08:00
Jimmy McCrory 554a6df961 Add MySQL connection SSL support
When 'gnocchi_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: Ib5a87e9366cd9e5a78ccb774ced46e1791e7691d
Partial-Bug: 1667789
2017-12-15 07:30:55 -08:00
Jesse Pretorius 5a0c6431e5 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: I738635a01fb64e72f769923cc4989e57e0ae0f40
2017-06-04 11:20:42 +01:00
Jesse Pretorius 1b71d3499a 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: I6ecdf214fc22916c82c219d02451c32aed9235dd
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:51:31 +01:00
ji-xuepeng 2e99c5d88f Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I4e1094e7cef87c3cb094b2447c0bec1cb61ad9bf
2017-02-06 23:15:15 +08:00
gecong1973 14d0edf6da 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: Icd42bce0d9e0547ecfe70676061176c9b7fa6987
2016-12-04 10:05:13 +08:00
Jesse Pretorius 6151a6d57c 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: Ifa1f9f5ea5172309749029c7f5b4c79845a94c26
2016-10-19 07:42:36 +01:00
Jesse Pretorius be74e19ff9 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I160ac6095c83fbe904f594a9669badfd6961d5bc
2016-10-05 18:23:43 +01:00
Deepak e131d6e468 Update test-vars.yml for repositories
Renamed in os_gnocchi role repo
Changed test-vars.yml to os_gnocchi-overrides.yml
Removed the test-vars.yml

Change-Id: I62ee2338f6bfeee06511a3077e11ed1e84baa66c
Partial-Bug: #1629284
2016-10-05 22:03:09 +05:30
Jesse Pretorius 610a2ae13e 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: I2178ab04ba9cb25f98ed9931b03e9a6022e1be50
2016-10-04 11:41:18 +01:00
Jesse Pretorius 4767424831 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: Ieb2fda744a452e1244213cffe293d348a3771c63
2016-09-27 18:50:01 +01:00
Travis Truman 30bb3111cd Functional testing for the role gate
Simple REST API based functional testing for
gnocchi will now be run during the gate.

Change-Id: Ied96bca01cd3e6f47f2d75505d516b1eafbc7429
Closes-Bug: #1624521
2016-09-22 15:38:40 -04:00
Travis Truman f4a9c58d68 Ansible 2.1.1 role testing
Change-Id: I0107c3a96bdae14baaedfb5634b4079c58e11f2a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 13:30:23 -04:00
Jesse Pretorius 418b383287 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: If213cc3de1b4cf500f9497452d12ab1e1f67446c
Related-Bug: #1620849
2016-09-09 10:32:42 +01:00
Kevin Carter d883984c78 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: I83749475714da3029efe6d0c349a701d90ef6dd6
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:29 -05:00
Jesse Pretorius 0613699740 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: I4b28425fca013374521f6354551ee11ad69485e3
2016-08-20 16:05:26 +01:00
Jean-Philippe Evrard 4f3fed6c11 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: I3be0b2aa768071afec1dc0f475712627ae574372
2016-08-11 18:09:04 +01:00
Jesse Pretorius bc763b4279 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: Icc2888700616b396c41e20f1b2638de59bc41f60
2016-07-25 21:43:34 +01:00
Jesse Pretorius 00da0e8542 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: Ie59e6ec5c3a8315f44eac2b6166a27a12695577e
2016-07-15 14:02:21 +01:00
Jesse Pretorius b0f2e477a0 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: Icb38c2524ea42a5d8d1ff30183af1cb9bfaaa5bd
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:55:42 +01:00
Jesse Pretorius 979ede3af8 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: Ic815ad5872ce1332066241883eecf52557c3c9f2
2016-07-08 14:27:35 +01:00
Jenkins f995806d87 Merge "Initial convergence testing" 2016-04-22 11:58:29 +00:00
Steve Lewis a7c38ce7a1 Initial convergence testing
An initial convergence testing for the role is provided but it is
not installing or configuring ceilometer yet. That work is held back
until we have the role passing basic testing. This stage of testing
also attempts to avoid installing rabbit as an unnecessary
complexity.

A separate container is used for gnocchi so that gnocchi can be
deployed under mod_wsgi without conflicting with Keystone. In turn
some changes to the inventory pattern, and the use of group_vars for
internal and external _lb_vip_address values is introduced here as
there is no load balancer and traffic for each of Keystone and
Gnocchi needs to be addressed appropriately.

Partial-Blueprint: role-gnocchi
Change-Id: I27a76a62b2443787e5347f08e974a9eb3cc33dbe
2016-04-22 00:14:14 +00:00
Jesse Pretorius e2252e347a Add reno scaffolding for release notes management
Change-Id: I386072a86e60eb7e7e1b3c92b26cd3fa05af5f90
2016-04-14 11:40:45 +00:00
Steve Lewis 3610b115bb Enable ansible lint and syntax tests
This prepares the role for the next stage of testing, enabling role
convergence testing.

Change-Id: I12a9621ce3604fd7d2d3609b0586c894eeea9e9a
2016-04-12 09:32:17 -07:00
Steve Lewis b3a6391503 Enabling bashate and pep8 lint checks
As a step toward throrough testing of the role, lint checks need to
be enabled.

Change-Id: I60a2eafe4f65c7e2754ba4599b3f472a865c1450
2016-04-11 17:00:57 -07:00
Steve Lewis ca23bfd53d Enable docs task
To get the role to pass requisite tasks, a placeholder for the role
docs is provided.

Change-Id: I8ca687405a68103ef6014a5453e8ddf96c8ad599
2016-04-11 16:53:43 -07:00
Steve Lewis b5282439bd Prepare for role integration
In order to integrate this role with OpenStack-Ansible there needs
to be using standard CONTRIBUTING.rst and README.rst and the same
.gitignore and .gitreview and setup.* pattern as other roles.

Finally an other-requirements.txt, test-requirements.txt and a
tox.ini are introduced as the basis for docs building and testing in
openstack infra.
2016-04-04 15:23:25 -07:00