Commit Graph

41 Commits

Author SHA1 Message Date
Jonathan Rosser d047589d02 Cleanup setup.py config
Change-Id: Ifea72334825fb7cf145bfe2f3dd747cbb58ce25b
2022-04-04 10:24:05 +01:00
likui 14792030b5 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: I8692f2ad6c997de8ee2170b4b3623482969e0bfb
2021-07-03 21:19:01 +08:00
zhoulinhui a842b99adc 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: Ia5d8154c5c52c73a63f3ff75e724a4bd03a3e5b6
2020-11-10 05:16:31 +00:00
melissaml 8ac0d7586f 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: Ib42c12dffafe11104db0a4688930a75c3465a296
2020-04-14 17:01:18 +08:00
Ghanshyam Mann 62d04f5ff2 [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: Ida095b81e9154ecd1b424ca2b1ef8297385fd79f
2020-03-01 18:54:34 -06:00
jacky06 25823c4838 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: Iad6c20e328edab65db5387215dde9b66d87aceaa
2019-10-23 17:42:53 +00:00
Dmitriy Rabotyagov 089a1bd345 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: I688c5cb2f5e5d0e44b01f41668f1e8dd6fed79f4
Story: 2006105
2019-10-18 16:27:53 +03:00
melissaml 3f7ed9e51e Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ide9495e549aea76446d5ef03fa75955ae081385b
2019-07-10 22:58:32 +08:00
huang.zhiping 87a8d52147 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: I79fe36a1d93a1a4388d009d9b46c5e9fd74a7cc4
2018-09-30 08:14:06 +00:00
Doug Hellmann 378254a46e 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: I5a2b4358e7e3698c8dea271845fe44c5cbeb4077
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:43:34 -04:00
Jesse Pretorius 9a2f843dc1 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 revert the use of project templates to using job config
   directly, given that nothing other than Ubuntu is supported.

Depends-On: https://review.openstack.org/600906
Change-Id: Icc88c81c5c8247a4f511819d38b08ac1cf5262e5
2018-09-08 11:21:11 +00:00
Zuul 596d05eb1a Merge "fix tox python3 overrides" 2018-08-23 04:07:32 +00:00
Jesse Pretorius 9c1198afa6 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: Ifdb998e28223522550f82fdc5fe731145f9b7217
Needed-By: https://review.openstack.org/579371
2018-08-16 18:19:07 +01:00
Nguyen Hung Phuong 1b0d50a1ab 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: I4f7cb3a3472bef95eca7d663eec73d598ea33641
2018-07-05 14:08:09 +07:00
Jesse Pretorius f311c5ac61 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: I8dcbb9d2a6d170572098acd74de389929902fae5
2018-07-01 17:04:38 +01:00
Jesse Pretorius f1c09f62df 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: I5e5022cbcaff6de7abfc7d2a56612b59dddc97d7
2018-03-28 10:14:26 +01:00
Jesse Pretorius ff410aebf1 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: Ie5d02e4ab2594cf72e293e9c0f82e7546a186ba9
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:59:32 +00:00
ZhongShengping 76e0a03af0 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: Ibfa2e057d78692d1ac2fe47736a584d59ed8e1e3
2018-03-09 12:01:26 +08:00
Jimmy McCrory 3ecdde1129 Add MySQL connection SSL support
When 'ironic_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: I1c0598a2f83d330014ffbb2612386016347d3425
Partial-Bug: 1667789
2017-12-14 11:16:50 -08:00
Jesse Pretorius 80effcd3f2 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: Iba56c5d6d1bb4b3a78bc5f0fd752420ab3cb9cf2
2017-06-04 11:21:08 +01:00
Jesse Pretorius 7aeb1c65d3 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: I46e8d71e36c37d916836fad2c0604183aab46a0b
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:51:46 +01:00
Cao Xuan Hoang a23c4379bf Use https instead of http for git.openstack.org
Trivialfix

Change-Id: Ieeaa60e79b9e3f77ca87ff53c90ad7b44670c4f0
2017-02-06 16:59:32 +07:00
gengchc2 de48a822e8 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: Ic8685a4f595d981f4b60a6f6a0ac66f3a91a08be
2016-12-06 09:19:16 +08:00
Jesse Pretorius 34378571b4 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: If6c0cc075bc495d259b2e344cfa1050f092770b7
2016-10-19 07:43:05 +01:00
Jesse Pretorius a404529ec0 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I2623678bc73068a64178fafc94db124c8c62ba83
2016-10-05 13:06:55 +01:00
Jesse Pretorius a8b4441576 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: Ie2cc718173015a681209d73737a4a7b60af7216c
2016-10-04 11:41:47 +01:00
Andy McCrae 729fbca6bf Move to non stand-alone ironic
We want to add virtual bmc testing and a full stack test of Ironic, as a
first step lets set it up with all the integrated components.

Change-Id: If4db7ada81e3ce54a6f28db6a67e7e0b4d679cce
2016-09-29 08:27:03 +00:00
Jesse Pretorius 53491a3f6d 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: Ie01392e33b86b9b61019cc733f9f3db15f36c19d
2016-09-28 08:51:21 +01:00
Travis Truman 5ee8b16437 Ansible 2.1.1 role testing
Change-Id: If01b3672825aae1cab690035b43cf2da92180ead
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-21 10:01:36 -04:00
Jesse Pretorius 8cf25017e4 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: I00a05dfd4774036822bc2b19f010c00bd50b31f2
Related-Bug: #1620849
2016-09-09 10:34:51 +01:00
Kevin Carter 794974c5a0 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: I9ddf80f1c8cc22e170bb32c17ecacf79cc99120a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:36:44 -05:00
Jesse Pretorius d9e9eed948 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: Ic4e51f4db3933d9b6d814274930cc8580ea3ae00
2016-08-20 16:05:53 +01:00
Jean-Philippe Evrard bc2da2a2de 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: I75e24492d91203d9c07a57658aac917c76564994
2016-08-11 18:09:20 +01:00
Jesse Pretorius 3f96ca867d 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: I33eaae97d9e2bc6da6197db67d82e9aa8737e766
2016-07-26 00:39:31 +01:00
Jesse Pretorius 515bed2293 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: I26f68c3bc7b9627fccc98451f51cb892923a0866
2016-07-15 14:02:49 +01:00
Jesse Pretorius 46f1e9ed6d 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: I074de434b56abbdfe4202cfb8e55c296480a348a
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:56:06 +01:00
Jesse Pretorius ff280f7957 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: I6ae5a5e1beab62992dc7cf35fa85057a2c648851
2016-07-08 13:35:37 +01:00
Jesse Pretorius f5f4621db2 Add reno scaffolding for release notes management
Change-Id: Idd59b182fcc81b79e5ccd6593351f773fbbd440a
2016-04-09 18:19:48 +00:00
Jesse Pretorius b5d7b7986c Implement initial test inventory/plays
This patch implements an initial set of inventory and playbooks
which results in the successful convergence of a standalone
build of Ironic.

It also adds the rootwrap filters, implement config_template
for all the conf files appropriately and ensures that the sudoers
is implemented in the right order of execution.

All content is based from the head of stable/mitaka on
24 Mar 2016.

Change-Id: I9182951c394a8c52826480aba7bc7e4d437988c5
2016-03-24 23:58:05 +00:00
Michael Davies f8eb0aebfe Ironic: Fix docs & linting tests
Unfortunately the first commit of os_ironic had broken tests. This patch
corrects the test configurations to ensure that the docs and lint tests
work.

As a temporary measure, functional testing is left as a place holder
to allow other patches to be worked on for this role while the functional
testing is being put together.

Change-Id: I38278155232a4e4d6ef259b79bd515fae2bc837b
Signed-off-by: Michael Davies <michael@the-davies.net>
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2016-02-24 02:25:52 +00:00
Jesse Pretorius a200b5b3b3 Add required base test configs
This patch adds some extra configurations required in order for
tests on OpenStack-CI to work.

It also adds some basic changes to document content.
2016-01-05 13:28:19 +00:00