Commit Graph

37 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d9df50f4e3 Retire pip_install 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: Ibf9ce1d602c5cfa9ed7431ca37de02df3335b36a
2020-04-06 14:27:00 +00:00
jacky06 7a9f2182c1 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: I93c41550963f60155e3062c702256366d3cbcdf7
2019-10-23 17:39:53 +00:00
tonybrad eaf4153d9b Update to opendev
Change-Id: Icac06b9262f23b48c7677780c39f2ed10a7b8b3f
2019-05-21 08:58:39 +00:00
huang.zhiping a605098e48 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: I91a089d537319f03e9abbe790e35f5e314a42a57
Closes-Bug:  #1801657
2019-01-12 03:18:54 +00:00
Doug Hellmann 1795eaa29b 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: If79f6527682c2c6ed05317ebfe04285af87e72a0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:44:47 -04:00
Jesse Pretorius 742b0e5744 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: I26166d6bcd2eefc1c25f3e2ed7c96005a78a4a8f
Needed-By: https://review.openstack.org/579371
2018-08-16 18:29:12 +01:00
Nguyen Hung Phuong 88da361415 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: I2095d534c536cb2c00fe652f06a6f65dde1d993e
2018-07-05 14:03:31 +07:00
Heba Naser be17af0a42 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: Id9c7dbb5aedf9247e58e9d40b4290f2bf2348611
2018-07-02 11:49:54 -04:00
Jesse Pretorius 2f3108f06d 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: I0f23bdd498023c6fdd4e9f8fdf17a833162f7452
2018-03-28 10:17:11 +01:00
Jesse Pretorius a355a0491a 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: Id0be68dff2a6f12b06b514fa4287f095ccb6fd9d
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 18:03:07 +00:00
ZhongShengping c4c690ce07 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: Ie1dea4e898b8c5ec40f3c3a2e7ee5d179f00f79f
2018-03-09 12:01:28 +08:00
Jesse Pretorius 1bd49f3201 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: Ibdbe49fe6d408627762185aaa20a609f6b5e2343
2017-06-01 12:39:48 +01:00
Jesse Pretorius a8410456ee 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
Change-Id: I182a92b547f0e0bca420460668ff2ec26dab5a28
2017-05-04 11:41:30 +01:00
Jimmy McCrory 289531e46b Enable idempotence test
Tasks involved in the online install of pip have been made idempotent
and the idempotence test has been enabled.

The selfcheck.json file will only be written if it does not already
exist. Blocks have been added to tasks that have a fallback if they
fail. Tasks that run commands to install or download pip packages now
check stdout for success messages to determine if they should be marked
changed.

Change-Id: I0d440efd4d95420f6f43316f5e0242b8884293c8
2017-04-05 12:19:20 -07:00
ji-xuepeng f830ec0a0f Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I6e601798b092431015cbeb6eac5669f948a1d250
2017-02-06 21:45:09 +08:00
gecong1973 d649f25c4b 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: I27d59c588a200f4b12f3eee9e5400febe296d6e1
2016-12-06 09:12:51 +08:00
Andreas Jaeger 52eef0d204 Properly use constraints
OpenStack CI is fixed now, we can remove these extra install commands.

Change-Id: Ice5518cd12ff8d09fa7fc7fca886a4ac729cc24b
2016-10-18 19:28:36 +02:00
Jesse Pretorius 92fbfc238d Add ability to set upper constraints file
When this role executes the installation of packages
for SNI support it should also respect upper constraints.

This patch adds the ability to set an upper constraint
file URL/path.

The tox config is also adjusted to ensure that it makes
use of upper constraints when installing requirements.

Change-Id: I2ab6f55096b560a7b443de412df168e26a3eca07
2016-10-18 16:59:58 +01:00
Jesse Pretorius 08fbbb1969 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Id72bdf7a4569b9c6ee8fee2a070ac72c945d4470
2016-10-05 12:17:51 +01:00
Jesse Pretorius 42a4357717 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: Iac1ea510102b89d1bc53b10aa2f53ed673abb014
2016-10-04 11:43:49 +01:00
Jesse Pretorius fd120da9ab 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: I48828c386e4db600a099ebe700f823b811cbc88f
2016-09-28 10:51:19 +00:00
Travis Truman 4ca560ae78 Ansible 2.1.1 role testing
Change-Id: Iee3eaecf2de09ad1601ed48588a02291a1122592
2016-09-14 10:32:31 -04:00
Jesse Pretorius 903dab08a8 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: I97d783e36b8cda13dece1a06b94ad39ad1b46a13
Related-Bug: #1620849
2016-09-09 10:51:46 +01:00
Kevin Carter 3a920f86d1 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: I7bf72b7b39891879aca44b730164dc8a4db6a6bf
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:37:55 -05:00
Jesse Pretorius 228bbdf182 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: Iad347c36e2adbf0c5864e84e0accbb6eb8faec41
2016-08-20 15:49:35 +01:00
Jean-Philippe Evrard f703c016b8 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: Iab013aba9c42631e49e17f7001aa78b6bfcdd662
2016-08-11 18:10:59 +01:00
Jesse Pretorius 6742c05efb 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: Ib42f126e4423a39e9431aa1ee7ab57dc7e9d2ead
2016-07-26 00:44:34 +01:00
Jesse Pretorius 710515e903 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: I7775cd6f46c0aad9ef7837f6a81556733bb4909a
2016-07-15 14:04:15 +01:00
Jesse Pretorius b91f8e8d7f 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: Id320fba82a747f81ead3cf1e0ae4106a120b5d22
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:57:26 +01:00
Jesse Pretorius 31f0b4059c 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: I71984660d1bd68fdc8f68e38165d90ed2130310b
2016-07-08 12:44:24 +00:00
Jesse Pretorius 6bbb541ec1 Add reno scaffolding for release notes management
Change-Id: I38084c1febf0aff5bf2b6bacf76c036a2e7bb401
2016-05-03 12:41:17 +01:00
Jesse Pretorius 2ebd3b4d6b 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.

The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.

The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]

[1] https://github.com/ansible/ansible/issues/13563

Change-Id: I7b9bb6dd01df4dce0da3bb94525826a47880bf3b
2016-02-12 12:16:16 +00:00
Jesse Pretorius 523ccf8d3e 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: I9290dfefef981b5402a98b3fbdb59d70c2357855
2016-02-03 13:21:31 +00:00
Paul Belanger a39b73c193 Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: I1645baafac5b13c1ff58ecd059d0c1c0c9185b8d
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:40:56 -05:00
Jesse Pretorius e796a42070 Merge bashate/pep8 lint jobs in common job
Instead of launching two separate build jobs in our CI infrastructure,
one for bashate and one for pep8, launch a single one. While the jobs
are short, the setup of the images takes a long time, so this is
friendlier to our CI infrastructure.

Use the pep8 environment as common lint target and merge the bashate job
into it.

This patch also renamed dev-requirements to test-requirements to bring it
into line with all other OpenStack projects.

Change-Id: I253426461e6453eaaff6d74c92f36852e4ca7cf4
2015-12-15 10:44:42 +00:00
Jesse Pretorius f88b453702 Update run_tests to be more complete
This patch updates the run_tests convenience script to make it
execute all test environments using tox, but also ensures that
all the correct pre-requisites are in place before doing so.

Change-Id: I7c7d8caead7da9c830566b2fe71612a71205bf46
2015-12-09 13:39:46 +00:00
Kevin Carter 2dd4df9d3d
IRR for pip_install
The change moves the role out from the main repo pip_install
repository and into its own standalone repository.

Items within this change:
  * The role has been updated to ensure it runs standalone.
  * Tests added to the role within tox.
  * Functional tests added to the role that can either be run
    via the run_tests.sh script or using tox.
  * dev requirements have been updated for testing usecases.
  * Docs added to both the README.rst file as well as the docs
    folder.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-11-03 02:34:10 -06:00