Commit Graph

35 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 2b42bf0359 Use hostnamectl command to fetch hostname
In CentOS Stream 9 we don't have /etc/hostname file. At the same time
hostnamectl provides expected output. Thus we switch to more modern
way of fetching hostname that works equally good for all distros.

Change-Id: If5212d5432cc49fb9745f77ebbef9525e2a3b393
2022-12-28 21:35:01 +00:00
Dmitriy Rabotyagov 3d92c7da03 Fix linters
Change-Id: I1f7f3d920f1017d1d5e0c4c11c3544677d992a7c
2020-11-17 16:00:03 +00:00
Jonathan Rosser 014a39ad1c Remove func-py3 tox environment
All tests are now run under python3 by default so there is no need
for a python3 specific tox environment to remain.

Change-Id: I3f44cf364d923c8c83a56289526cbf3dac38543c
2020-06-16 12:21:16 +01:00
Andreas Jaeger c063ad0218 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove setup* files, those are not needed anymore
- Cleanup */source/conf.py to remove now obsolete content.
- remove install_cmd, move constraints into deps, cleanup
  tox.ini
- Enable warnings for docs build, fix problems

Change-Id: I3f91f00195f869c6ec09af1a88cfd189e8a71254
2020-04-27 20:23:20 +02:00
Ghanshyam Mann 73fc8138ba [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: I15033122c03bfb2d1c1d259e61529828dbc24a14
2020-03-01 19:23:41 -06:00
jacky06 060546109c 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: Ib70dbd7305e3a204c68d5415ea1772231f680028
2019-10-23 17:43:56 +00:00
Jesse Pretorius b28590f5bd Remove the config_template module
The config_template action module has now been moved into its own git
repository (openstack/ansible-config_template). This has been done to
simplify the ability to use the plugin in other non OpenStack-Ansible
projects.

As part of this, we now need to remove the environment settings given
to ansible so that the common tests repo settings in ansible.cfg take
effect.

Related-Bug: 1791258
Depends-On: https://review.openstack.org/635841
Change-Id: I3a7d8c0c248febc4223029e076062ca68312b104
2019-02-11 16:43:57 +00:00
huang.zhiping 2ebc891885 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: I426af536281d4ea0c862c1415c89a365db9940b7
Closes-Bug:  #1801657
2018-11-08 13:34:14 +00:00
Doug Hellmann 07bf5919d7 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: I65ac6fd681f250aefacef574c15f9184f96bde4d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:44:51 -04:00
Jesse Pretorius 4a7d4d10e6 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: I6e7c44eac674cd15938776b89d63a8701314bf0d
Needed-By: https://review.openstack.org/579371
2018-08-16 18:29:27 +01:00
Nguyen Hung Phuong 06b53353a0 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: I94cc3aca5e67ee5172db4b8b581c8159558642cf
2018-07-05 11:48:48 +07:00
Heba Naser c8e8e8d2a1 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: I32e1ee1f06706eb99d1fb84300d10d92f8b7d2c2
2018-07-02 11:56:53 -04:00
Jesse Pretorius f54c191b61 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: Id638de82323d45016b5f5c4b7f5c9711ec89c88f
2018-03-28 10:17:20 +01:00
Jesse Pretorius 966cb309e4 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: If9563a94b14017669c15c361dfcaefa23508393c
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 18:03:17 +00:00
ZhongShengping f656197360 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: I241de1183c537870746bfead36fa77f510c6beef
2018-03-09 12:01:28 +08: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