Commit Graph

39 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 136fb01192 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: Icf0be2ec722383363b2145955bdaa5b02bcae9a2
2023-08-17 16:32:21 +02:00
Dmitriy Rabotyagov 50f4db5bac 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: Ibf6b05d89cf1d8f113881d64878c58256b865342
2022-12-27 17:53:21 +01:00
Marc Gariepy d18196b6dd Cleanup setup.py config
Change-Id: Icd1ce8fabb545a011bd234705035ec58602728e9
2022-03-31 10:39:23 -04:00
zhoulinhui 458687eb9f 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: I26b24864714d6d7c3820c2b7f1bbf4935153d78c
2020-12-14 14:37:34 +00:00
melissaml 1b1bd593c8 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: I083f48da5fc2786d0628195edebbfff97c46aba4
2020-04-14 17:09:33 +08:00
Ghanshyam Mann 6a579f33a6 [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: I541826fcffe9356f4a05c5920f7d9522d9afb0ed
2020-03-01 18:54:40 -06:00
jacky06 346cf9d55e tox: Keeping going with docs
Change-Id: I33bdb936a2090aed35e1f46daba0dcc334614f80
2019-10-24 01:18:56 +08:00
Dmitriy Rabotyagov abb576246c 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: Ie773541548107ebfc971a7f24b05d83fb0b95663
Story: 2006105
2019-10-18 16:40:52 +03:00
melissaml 9a718247f7 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0f1c6adc541b3bfccb523f4a48552933fd9ef309
2019-07-10 19:26:51 +08:00
huang.zhiping d25513f3a8 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: I81b29590187111cfa9770e4105883c943272a7d1
Closes-Bug:  #1801657
2019-01-12 03:26:55 +00:00
Doug Hellmann 666c67a9df 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: I3c92b9f944510507c838361dcc7327fcd3566ed6
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:41 -04:00
Jesse Pretorius e5cd133aeb 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 openstack-ansible-functional-opensuse-423
   job given that it is passing consistently.

Change-Id: I92cf6959544a9f8af8c207d6ff17eff18a8a242d
2018-09-07 15:11:04 +01:00
Zuul bf750078a3 Merge "fix tox python3 overrides" 2018-08-23 04:13:31 +00:00
Jesse Pretorius 90ce328ef2 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: I513888f9b4633347d89ea07a0641728b6a925108
Needed-By: https://review.openstack.org/579371
2018-08-16 18:19:40 +01:00
melissaml a47c21d14d 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: I6a888ce2c0b7d1dc4de775157236f7b366415362
2018-07-23 19:18:22 +08:00
Jesse Pretorius c78bcf30ff 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: Ic3b50ec24b964454bd4656a78aa08e2209a7acaf
2018-07-01 17:05:48 +01:00
Jesse Pretorius 3e4e1477a9 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: I05ea8250283fbf616b8f4de157c9e803b0f05ca6
2018-03-28 10:14:46 +01:00
Jesse Pretorius a999dc3828 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: Ia391b214a75f046dd6cae8c807de65700becaf31
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:59:55 +00:00
ZhongShengping 1c68c2b5c3 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: I54defccc7c1397c465e0b6452afdc73214949762
2018-03-09 12:01:26 +08:00
Jimmy McCrory e2c5cc2cee Add MySQL connection SSL support
When 'magnum_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: I1ac622926542ff6a3dfca7be3703f33ede4013df
Partial-Bug: 1667789
2017-12-14 11:21:50 -08:00
Jesse Pretorius 018f256730 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: I82fe9be523a4310e7067ff89583e970e8955eac2
2017-06-04 11:21:33 +01:00
Jesse Pretorius fc3732d9b1 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: I6d69ead3807870f9403f509c286e5fe1afb89549
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:52:12 +01:00
gecong1973 3056f0b2b5 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: I945629b0300f8f5e4b3db5d47d4b930fb5872fdb
2017-02-06 10:42:11 +08:00
gecong1973 be80f23c97 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: I50d27dee4c49cb3c9a255436113cabff39d270a7
2016-12-02 11:30:46 +08:00
Jesse Pretorius 007a748cbf Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I71328a0d24eec716232a227ce52c63e25102ae46
2016-11-02 19:22:46 +00:00
Jimmy McCrory 6f477978b2 Add basic functional tests to role
This implements the use of the openstack-ansible-tests repo and deploys
magnum, along with dependent services, to exercise basic functional
tests through tempest.

Change-Id: Ib9c986b5abe3f42b663af9981bed43c9aae8036d
2016-10-04 15:18:12 -07:00
Jesse Pretorius ccf66e2659 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: If9aaf03fac78fedf8fd7d9c073660371ee97bcc1
2016-10-04 11:41:58 +01:00
Kevin Carter 71a00384ce Update testing bits for consistency
Change-Id: I397fd4453481c5f142a009115f21bb185445506a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 17:13:36 -04:00
Jesse Pretorius 84f70de1c9 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: I8f2d557b64105f1c6043c27bda790f72babb78a5
Related-Bug: #1620849
2016-09-09 10:40:12 +01:00
Kevin Carter a7ff989c40 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: I5982ac8888bb748d565bd0cd67cb377676eae158
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:54 -05:00
Jesse Pretorius f3b7eccb9c 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: I458e8a3509e7ef993be049126106703b88777ab5
2016-08-20 16:06:11 +01:00
Travis Truman f9bc8fac6d Ansible 2.1.1.0 role testing
Change-Id: I8e579d9bf450b072ed06934076c3039f26378717
2016-08-11 23:28:11 +00:00
Jean-Philippe Evrard 56158d2e30 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: I066b80543c6ac5fdd6dc49ae08d4d2c323c12504
2016-08-11 18:09:38 +01:00
Jesse Pretorius e0eadde1e2 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: I077633386eeb83f94660547baf44e0edcfb34f78
2016-07-26 07:31:41 +01:00
Jesse Pretorius caccb1c818 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: Ie6221a80c3524a3cb2c89c6cd034ae5502cd3d01
2016-07-15 14:03:06 +01:00
Jesse Pretorius 8757f0700d 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: I99c6b513bd7d891326e465bba22436d6b641945b
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:56:23 +01:00
Jesse Pretorius b4ce21e4b0 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: Ie60d616c315d3875f0aad3de487f733bdbd8c126
2016-07-08 14:38:15 +01:00
Jesse Pretorius 14959bdac2 Add reno scaffolding for release notes management
Change-Id: I8ec5dd6fc9717bcf76af6efdcfc4b68b063cafbb
2016-04-09 19:53:15 +01:00
Jimmy McCrory 1930e33fba Implement base configuration for OpenStack-CI
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 the standard tests.
 - An updated README, and added a CONTRIBUTING file.
 - The extras folder and files have been updated to match current
   conventions.

Change-Id: Ic85e398509b5069633f9b5865aff941d69ef7fbf
2016-03-18 11:41:53 -07:00