Commit Graph

33 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov f72de305b8 Retire openstack-ansible-repo_build role
As repo_build role has been succesfully replaced with
python_venv_build role, we have no need in it's futher maintaining and
releasing.

Depends-On: https://review.opendev.org/717715
Change-Id: Iaf1d6da8192afbbd18c64e2b58d54fa5804fe43c
2020-04-06 14:30:36 +03:00
melissaml 421a45eff4 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Icb4bf535394637e3179998c28c652b771e221900
2019-07-10 21:55:51 +08:00
huang.zhiping ff7c76e3e5 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: I67f6301eb296fae9fedfea189ceeef42c59280d8
Closes-Bug:  #1801657
2019-01-12 03:26:21 +00:00
Doug Hellmann 349e1dc024 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: If9568ddf5684303561cb4a4dc0077af99715edf3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:44:58 -04:00
Jesse Pretorius 3d486b25f9 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: I8fae4847868d9aec504b701c4c43fe15503f5e0b
Needed-By: https://review.openstack.org/579371
2018-08-16 18:29:59 +01:00
Nguyen Hung Phuong 9270889aac 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: Ifc17989df724900c48ea9345bdb9f0154c7dbe6f
2018-07-05 13:59:21 +07:00
Heba Naser 954d544301 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: I83efde2ee1aa243ba71b7774a2de780ec5f4c3e6
2018-07-02 12:06:50 -04:00
Jesse Pretorius 475ad050e2 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: Ib1c24330612bba522ee071430dd6a9c6f9108d3a
2018-03-28 10:17:39 +01:00
Jesse Pretorius 1956378810 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: I232c75a27fbcdaef313ffc814c3c25a72fe47cdd
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 19:58:08 +00:00
ZhongShengping 31e010a9cf 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: I4e934ad5c8ddccf7a6f584841fcdedea4f254710
2018-03-09 12:01:28 +08:00
Jesse Pretorius 6083f1b8cb 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: Ifd53854badeeae5ee044af419a35727c85d52287
2017-06-04 11:24:04 +01:00
Jesse Pretorius 4a34d61b30 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: I0a409895764cc1e318d1fd70efe6aa7b5ba3def2
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:54:30 +01:00
gecong1973 a6a26b6dc8 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: Id385829fdc405e361275e5b0660794ae69874430
2017-02-06 11:02:01 +08:00
gecong1973 add6ed501e 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: Ifdf4b6fea52b7c9c6de0f95e5ca86ff3b535fd71
2016-12-02 11:26:06 +08:00
Jesse Pretorius 1f6968fef7 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: I09e44a86ebdee2f2e1247b30ad8073829094bc16
2016-10-19 07:45:55 +01:00
Jesse Pretorius 47c5ff6d7d Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Ic84d3c158848596f7d9f503ed11c952e15c69ffa
2016-10-05 12:18:38 +01:00
Jesse Pretorius a67b598db4 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: I335bbb8fad0561f1bc4ae7dc92750709fcda8525
2016-10-04 11:44:28 +01:00
Jesse Pretorius a858e8d032 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: I32e796d6166b27ea2df897d4a6f13183ea482e97
2016-09-28 12:00:16 +01:00
Kevin Carter 7d6168e753 Update testing bits for consistency
Change-Id: I059c7abeb096558113c0fd147cf4267d6cd69d42
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 17:05:26 -04:00
Travis Truman 294b4a0c76 Ansible 2.1.1 role testing
Change-Id: I8ddf65a83d7e3a7a6b7e108eda67f48b816cda74
2016-09-14 11:57:00 -04:00
Jesse Pretorius 322f15e246 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: If6aba5dc51838d1ddad961f3d2d03a702b7e5f57
Related-Bug: #1620849
2016-09-09 10:54:51 +01:00
Kevin Carter 55478b02aa 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: Ib783a75901ae148072728918ea7cfd4e011c7873
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:38:18 -05:00
Jesse Pretorius 1432b7544c 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: I4721f840b7fd38087fc4ebb7d885b98508400c07
2016-08-20 16:07:42 +01:00
Jean-Philippe Evrard c8bdaa01c1 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: I42bb2e4b81b622e8ef3f6681a680e3c16fdbb4de
2016-08-14 23:14:53 +00:00
Jesse Pretorius 07742dc85a 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: Ib658c1e504a0745fbe15cdec1f2860cab9af1701
2016-07-25 14:12:38 +01:00
Jesse Pretorius a5b805dddf 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: I46da50b45ed8fdb5737f8645287cb9cdd8eb02bd
2016-07-15 14:04:47 +01:00
Jesse Pretorius 99c6b7cdb8 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: I0f42dd827d4d1976f4354a298258ebdca81d6c24
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:57:56 +01:00
Jesse Pretorius 84010f0ffd 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.
- The role dependency order and role-requirements order was changed
  to ensure that ansible-galaxy does not fail when not forced.

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: Ideb7d77a845d1d1119bddf89d1a8c9b7d9517db8
2016-07-08 14:10:41 +01:00
Jimmy McCrory bceaaae011 Reorganize test playbooks
The following changes have been made to reorganize the structure of this
role's test playbooks, bringing them into line with other
OpenStack-Ansible roles:
  - move each playbook to an individual file
  - rename playbooks descriptively
  - define hosts and groups directly in the inventory file
  - include group and test vars required by containers
  - create a separate bridge, br-mgmt, for the management network
    interface of containers
  - enable verbose logging for functional test output

Change-Id: Idfdae98a423e19a1ed0eb05ab3d0f497b9fbeaaf
2016-06-18 09:15:52 -07:00
Jesse Pretorius c316b1ed52 Add reno scaffolding for release notes management
Change-Id: I681bcd1a4de1268cb9d6ea2d96a84575d76f9a22
2016-04-09 19:22:06 +01:00
Jesse Pretorius 7bad204bf7 Implement human readable logging for functional tests
This patch implements a callback plugin to provide human readable logging
for functional tests in order to aid the resolution of any functional testing
failures. The plugin effectively replaces verbose logging output from
ansible-playbook, so that's been removed from the functional test execution.

Change-Id: I9ad012cec3708d0a571c0a8a817e3ef5f6d2b15c
2016-03-14 13:48:49 +00:00
Travis Truman 533c36b48d Enable role convergence testing against a repo_server
Test uses a single container repo_server and then runs
the repo_build

Closes-Bug: 1553992
Change-Id: I38d8c22d9e7f9dc5ee73e7eb9aa898d98bf554eb
2016-03-08 13:16:27 -05:00
Kevin Carter 119d87a456
Implement base configuration for independent repository
The review updates the base repo for IRR functional testing.
The current test structure is a simple pass until actual tests
are created. This change also pulls in the updates from review
https://review.openstack.org/#/c/284896/11 This role will not
function without these changes.

Change-Id: I05809190c38b113bab1ac14616d3a2d51a58e22f
Implements: blueprint independent-role-repositories
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-03-01 15:02:10 -06:00