17 Commits

Author SHA1 Message Date
Monty Taylor
d7cba9d7d5
Combine tox-siblings and tox roles
There is a bunch of duplicate logic between tox and tox-siblings, the
tox-siblings logic is already protected with a flag - and having them be
split already led to not doing the right thing with constraints files in
siblings when we did it right in tox itself.

Combine them into one role.

This means the siblings code will run as part of run instead of as part
of pre- but that's how things have worked for years anyway until
siblings was introduced - and is also the behavior is the siblings flag
is false -so it's more consistent overall.

Leave a no-op tox-siblings role so that we can gracefully remove the use of
tox-siblings from castellan, python-openstacksdk, shade and tacker.

Change-Id: Id61ae52d48b28cfc2221cb556a1c1f7c6dfd60dd
2017-11-29 15:34:08 -06:00
Tom Barron
74a40ec89e Collect output from coverage job
Add a post-run playbook to tox-cover job to collect the coverage
report detail and copy it to the log root of the executor.

Change-Id: Ibad091f7630832eb993133b0f43a60931b3dfd75
2017-10-17 21:58:36 -04:00
Monty Taylor
56f6938968
Override tox requirments with zuul git repos
It's a common desire to be able to have a job that runs unittests
against the git checkout of another repository, but getting the tox
environment into that shape is a bunch of extra work.

Now that we have a defined place where repos go and they're always on
the build node, we can look in the source dir for git repos that contain
python packages and ask setup.py for the name of the python package they
provide.

We can then see what packages tox decided to install for this
environment, see if we have any matching ones in the source code repos
we've put on disk and if so we can re-install those depends from the
source location.

That way we can cause a tox job to use a second repo for cross-repo
unittesting simply by adding that project to required_projects.

Add a flag to disable the behavior ... although the easiest way to
disable the behavior is to just not list other projects in
required_projects.

Change-Id: Ia5250c11b1d73baaa70ea1cef7ea1ba4d5bab821
Story: 2001136
Task: 4852
2017-09-11 12:55:26 -06:00
Zuul
14e2a22299 Merge "Split ensuring tox is installed into a role" 2017-08-22 20:47:21 +00:00
Monty Taylor
80ec023985
Remove tox-tarball job
This isn't really a general thing. We'll add a different thing in
openstack-zuul-jobs.

Change-Id: I7343977bd678c50a2ad1221692d56cafae3111f0
2017-08-22 16:09:03 -04:00
Monty Taylor
c36d95b4ba
Rename tox/tarball-post to python/tarball-post
The actions of the playbook don't really have anything to do with tox.
Tarballs go into dist/ whether tox is used or not.

Change-Id: I49d9efaf34644c47df0a1acb6ca108fe4ec99fa4
2017-08-22 16:09:02 -04:00
Monty Taylor
dafe1bfcb4
Split ensuring tox is installed into a role
We do this in a few places, make it reusable.

Change-Id: Ied118508dc4b8e4cbfca88b5636730664dbe10b4
2017-08-22 15:19:33 -04:00
Jenkins
5046ad8447 Merge "Create fetch-tox-output role" 2017-08-08 20:59:49 +00:00
Paul Belanger
4420bbd2c9 Create fetch-tox-output role
We can move the content from tox/post.yaml into an ansible role. This
allows other projects to use it.

Change-Id: Ic7fc31a372de29a3a97ef84539faf3b0a1d6e181
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-03 16:37:00 -04:00
Paul Belanger
1b5c55d875 Log file stats for tox tarball / wheels
Add some additional information about tarballs / wheels we are
copying. For example, md5 and sha1 info.

Change-Id: I96d6903f8bc5ced196b1b57f93277fa87bdf31c1
Depends-On: I86ff459d283eaf348821c2f11c1f8575598f088d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-02 16:57:33 -04:00
Paul Belanger
64785f464b
Update tox-tarball to use tox role
We no longer need to depend on our run-tarball / run-wheel roles. I
also plan to add back our sha1sum / md5sum files back in a follow
patch.

Change-Id: If4814a21192112d841fdb24cfdd1fd1a8bd427e6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-02 10:35:29 -04:00
Paul Belanger
851ba9ea4d
Support multi node jobs for tox logs
It is possible somebody may want to run tox jobs over multiple nodes.
Check to see if more then one node is in our inventory, if so then add
the inventory_hostname to the log path.

Change-Id: Icd0532cb415fdae42eae6d2269d5a0be5fcdf98a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-21 17:36:43 -04:00
Paul Belanger
1280a99434
Create tox-pep8 jobs
Because we want to use tox role variables (tox_envlist) across
multiple plays. We need to setup the variable in zuul.yaml.  However,
this now means we need to create tox-pep8 job now since we are using
the tox/run playbook.

Change-Id: I6c15c076a510375dfacc66a0e07bc3f1228adf06
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-18 17:35:56 -04:00
Paul Belanger
829297c37a
Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.

Fix variable linting issues and ignore ANSIBLE0012.

Change-Id: I07aa940245e700c9f08df0f1920720f0ed9d3de0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 16:50:06 -04:00
Paul Belanger
9258e5b6d8
Update to tox_envlist variable
Rename tox_environment to tox_envlist to better map with tox --help
documentation. This also allows the following patch to support shell
environmental variables.

Change-Id: I2fb4e1c167ef93ad2948f2d328beff5e39ac52b7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-14 11:49:20 -04:00
Paul Belanger
9e464b6438
Enable verify_host for synchronize
There is no need to have this disabled (seems to be by default). We
already have ensured our SSH hostkeys have been setup properly.

Change-Id: I5f0ffea13b4adb053c10d56728bcf02c13255513
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-11 15:55:03 -04:00
Monty Taylor
4b9fc09a1c
Port in tox jobs from openstack-zuul-jobs
The original idea was that we'd have a "python27" job. But it turns out
that "python27" isn't actually as universal as you might think.
"tox-py27" on the other hand is a thing that can and should always work
for people who want to run tox with the py27 env.

Port in the jobs we had in openstack-zuul-jobs.

Also, copy in the text of the old shell scripts so that we can iterate on
them and make them better piecemeal.

These are named zuul-tox not tox because we already have tox jobs
defined elsewhere. We'll need to do the naming dance while we work on
them.

Change-Id: I813f3f2ae138c07918556bc81655518023527131
2017-07-06 11:18:47 -05:00