Commit Graph

35 Commits

Author SHA1 Message Date
Takashi Kajinami 26a8d94352 Replace deprecated whitelist_externals
This option was deprecated in favor of the allowlist_externals option
and does no longer work in recent tox.

Change-Id: I1cbf545c382fdb4dda837699392e59061ccf8f75
2023-03-16 11:09:29 +09:00
Jonathan Rosser 802cafb7fd Modernise tox.ini and run OSA metal jobs in CI
There was no coverage of an actual OSA deployment in CI, so we
add this. Also remove the legacy python3 functional test
and move all tox environments to be python3.

Change-Id: I36cee01b9a14adf1840d35c3a8934de8a994f399
2020-06-16 12:07:52 +01:00
Dmitriy Rabotyagov faf60ddb53 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: Ib0fc3cabe19771c3f569d22c8b09aa456f4caf6e
Story: 2006105
2019-10-15 20:29:11 +00:00
Zuul 815505ec71 Merge "fix tox python3 overrides" 2019-07-18 14:36:25 +00:00
melissaml 1e44299c4c Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I103ca00b2f1e6df1a2ac2fad1e4dd40fc0c31b21
2019-07-10 21:22:27 +08:00
huang.zhiping 6056673776 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: I158a8368f1e2fd4df14753e69141111b451443be
Closes-Bug:  #1801657
2019-01-12 03:21:46 +00:00
Doug Hellmann ce6594517f 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: I9cc42f8bcbb38ec3a189affbee8b4b57adbf1ba1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:41:24 -04:00
Michael Vollman b74d7acbf4 Compare dict vars to determine changed
Compare dict vars of before and after configuration to determine whether
the config keys or values have changed so a configuration file will not
be incorrectly marked as changed when only the ordering has changed.

Set diff return variable to a dict of changes applied.

Change-Id: Ie67119b1420936c8ed89f8338ea9dce4c47e185c
2018-09-24 20:08:51 -04:00
Jesse Pretorius f0185deed0 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: I01e4df147134b3fa2eca8e9cae977db6444c9a48
Needed-By: https://review.openstack.org/579371
2018-08-16 15:03:08 +01:00
Heba Naser df1875aa8f 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: I1f61d9b31f983eeb21376166b80aca400235ced1
2018-07-01 21:55:02 +00:00
Andy McCrae 41ebaf72f9 Remove --diff mode support
In ansible 2.5 the way files are generated changes meaning that --diff
mode will stop working, and generate an error instead. Pending a better
solution, we should remove --diff mode.

Change-Id: I0d9b7baf08be00b978b8198f95db8962e7fa7787
2018-06-22 14:01:35 +01:00
Andy McCrae 4d93182786 Fix ordering for --diff mode setup
Due to the ordering of the vars passed to the _get_diff_data mode,
--diff mode would only work with --check activated, otherwise the file
used didn't exist and you would get an error similar to:

https://github.com/ceph/ceph-ansible/issues/2742

This PR allows this to work by configuring the diff data before running
the copy module, so the file exists.

Additionally, we should run with --diff mode enabled by default on tests
for this repository to ensure any functional issues with diff mode are
caught.

Change-Id: I020a181731c3ee87f04933f8c62213ea12cfa3a4
2018-06-20 14:04:06 +01:00
Jesse Pretorius c70530ddb0 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: Ia09ee6c5e0014332af211039fe4e1ae430a776ff
2018-03-28 10:10:27 +01:00
Jesse Pretorius 780bba94e4 Update run_tests.sh and remove tests-repo-clone.sh
The lint tests make use of the common linters test
used by the roles, so we need to ensure that the
run_tests.sh script is updated and the configuration
adjusted accordingly.

Change-Id: Ic623e6074a85e08416b30e3e42c48fe8873113d6
2018-03-28 07:56:41 +00:00
Andy McCrae 2c6ebef2a4 Fix pep8 for config_template.py
Gate tests will fail until we fix pep8 for config_template.py
This PR fixes the config_template module for pep8 compliance,
follows the latest PTI for docs compliance,
and re-enables the linters.

Change-Id: Ic288b462a53ac45983f47f29a7d5d8d48d0b9c0b
Co-Authored-By: Jean-Philippe Evrard <jean-philippe@evrard.me>
2018-03-26 12:53:57 +00:00
Logan V 15357d7f6e Add func_py3 toxenv
Use python3 to bootstrap the tox venv.

Change-Id: I8e3519141f5d8b8de0d9a6b539bd85060ae1e97a
2017-07-28 15:59:25 +00:00
Jesse Pretorius 69b9cdf556 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: If04c306c7f794dc80e4f6ff308ac27fefe4fc0fe
2017-06-04 11:23:48 +01:00
Jesse Pretorius a900eca8be 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.

Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Depends-On: I5da7802d61d2ab6b03908138e3a3ed2db22e3d29
Change-Id: Ib9e5f4c93529b6bf74e37ce9f2feb0faa87a3b81
2017-05-10 18:49:54 +01:00
Logan V 5d6c040d18 Implement tag filter strategy
Renames the "artifacting" strategy to "tagfilter" and implements
a more generic tag skipping implementation that can be defined
from within the ansible vars structure dynamically on a per-host,
per-group, or per-playbook basis.

To use the tagfilter strategy, run the playbook with
strategy: tagfilter

and define a hostvar named "skip_tags". Skip tags can be a string
or a list, and any tag CONTAINING a skip tag (an exact match is not
needed) will be skipped.

Also added is a check for a var called "skip_handlers", defaulted
to True. When skip_handlers is enabled, no handlers will be run
regardless of whether the task is skipped or not. If set to False,
handlers will be allowed to run as normal except when tasks are
skipped by the skip_tags.

Change-Id: I649707e6744e03763c4e786d203716ebf657ab48
2017-02-24 09:35:48 -06:00
ji-xuepeng 9dacd3ae93 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I48c3a762481f5c3187a6153ba71cc47430da1be3
2017-02-06 22:10:16 +08:00
gengchc2 736a2ff0b5 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: Idc4fceb40ea1219c7dd56411505bd275e012d401
2016-12-06 09:20:57 +08:00
Jenkins aa0cc3bf0b Merge "Ensure testing is against current commit" 2016-10-19 13:19:19 +00:00
Jimmy McCrory 0c964ebedc Ensure testing is against current commit
By using the centralized testing repo and its ansible.cfg file, a git
clone of the plugins repo is made to ~/.ansible/ and used for testing.
Effectively, testing of plugins is only done against the last merged
commit.

Set environment variables through tox so that ansible uses the library
and plugin paths in tree.

Change-Id: I61d60ae997d1bbcfdfa154a68908f7131ebc11c3
2016-10-19 06:02:18 -07:00
Jesse Pretorius aa0fe4a877 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: If8981345d225d9eb365c2027f6989898d416a93c
2016-10-19 07:45:34 +01:00
Jesse Pretorius c45a043407 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I3300e7111263e7a4daf8bc39286e9b1a8c67b87f
2016-10-05 11:19:58 +00:00
Jesse Pretorius 67acddf786 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: I3e7a1ae65be77766603be15404a32dd16b0ad8b5
2016-10-04 11:44:08 +01:00
Jesse Pretorius 44a1f65272 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: Iffbb70a29d1c5c0a7a9d0956b8df39fa53e0f686
2016-09-28 12:04:13 +01:00
Kevin Carter 544adfe686 Update testing bits for consistency
Change-Id: I85713b88818bcc1070a905a1e3a407f2d5e02e86
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-23 15:46:54 +00:00
Travis Truman d801f7813a Ansible 2.1.1 role testing
Change-Id: I4c144b1681e1699b225800921e67e89a19a688e0
2016-08-12 15:08:15 -05:00
Jimmy McCrory 04648159ac Add test playbook for filters
Add a playbook to test each of the osa-filters.

The linters tox test environment has been updated to include a run of
this playbook.

Change-Id: I0bd877ce7bbd56edc52cf071d02d55d0210f9829
2016-08-03 07:52:29 +00:00
Travis Truman 4a70773429 Add reno scaffolding for release notes management
Change-Id: Ia51af4f15a03b722bc419013d041244674511dd8
2016-05-02 10:45:15 -04:00
Jesse Pretorius 5c4df7b608 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.

Change-Id: I2e76678eb79ec4a52a7cce74997f59e005aee283
2016-02-12 11:52:57 +00:00
Jesse Pretorius da3da53c10 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: I7a682da5c94534dad4da441dbe285e9a33205a95
2016-02-03 13:01:51 +00:00
Kevin Carter 126d74a910
Updated repo for new org
Change-Id: Ic4465e617559fa3f3ba4b98d8ff5aa2d47d9d0e4
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-01-27 10:31:29 -06:00
Kevin Carter 2c9c5f005b
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-01-25 18:07:53 -06:00