Commit Graph

22 Commits

Author SHA1 Message Date
Clark Boylan e5dc872f09 Move tox logs into env specific dirs
New tox>=4 does not prefix the filenames with the env name. THis means
we'll squash together log files if more than one env is run. Address
this while on tox v3 to avoid regressions.

Change-Id: I2601cc7faa1f7a5d7f2d950d637dfa84c50717ae
2022-12-07 13:54:23 -08:00
Ian Wienand f76cfbab11 linters: fix spaces between filters
This fixes a number of places where we do not have spaces between
filters.  I think that this is a reasonable rule for readability (I
also think it probably was enforced, but maybe later versions got
better at detecting it?).

These are detected by a later version of Ansible lint; this change
should have no operational change to any roles but prepares us to
update in a follow-on change.

Change-Id: I07e1a109b87adce86f483d14d7e02fcecb8313d5
2022-07-27 17:13:39 +10:00
Sorin Sbarnea 0eaa5cf59a Upgrade ansible-lint to 5.0
- bumps ansible-lint to 5.0
- updates our custom rules to make them compatible with 5.0
- replace custom module mocking with native ansible-lint ones
- remove custom call of ansible-playbook --syntax-check as now this
  is done by ansible-lint
- assured molecule vars are hosted under a vars/ folder in order to
  avoid confusing linter detection.
- replaced custom rule for loop var names in role as now this this an
  optional core feature of the linter (see config)
- replaced custom rule no-same-owner with opt-in one (see config)

Change-Id: I233fae8c9036d295968a97ee80e07fde8846c633
2021-03-17 15:44:43 +00:00
Sorin Sbarnea 6b8cc6d468 More E208 (final)
Change-Id: I705d1b10696326f3d4d5bef4b5a88a83f2c3d960
2020-11-10 19:34:45 +00:00
Albin Vass c388e61160 Remove default tox_envlist: venv
Setting tox_envlist to venv by default is unintuitive for
many users. Remove this behaviour and let default tox
behaviour be the same as running tox on the commandline.

Change-Id: I1b6d59ee4ebb7f6b3adcf4bd35d7148e83389008
2020-07-16 21:59:57 +02:00
Albin Vass 58b291b5cf tox: envlist bugfixes
Change-Id: I17e807aa544f6fb45e82604f35c027fe1f86c2f9
2020-05-27 12:32:07 +00:00
Albin Vass 3b62d2d4b7 fetch-tox-output: empty envlist should behave like tox -e ALL
Change-Id: Ia01469bd4a6d62c27b07a3be2bb45bdcb18f13ee
2020-05-26 20:23:01 +02:00
Albin Vass a78060213a fetch-tox-output: do not synchronize owner
Change-Id: I49a744d6949da4623f7553b6ae05e84253dbe5bd
2020-05-18 17:05:32 +02:00
Albin Vass 9062289151 Check for loop_control in with_ type loops
Change-Id: I191265df7709a6262b44a428d78fe28ffaeb4b75
2020-05-01 13:45:34 +02:00
vass a32119249c tox: allow running default envlist in tox
Change-Id: I49638ab7949804fc967e337fa5ce21d2a3dc9d49
2020-04-24 18:23:05 +02:00
Albin Vass 0515041465 Use cached 'tox_executable' in fetch-tox-output
Otherwise this role could fail when tox is not installed in PATH.

Also updates the default behaviour to only collect the environments
configured with 'envlist' in tox.ini and collects all environments if
the envlist is set to 'ALL'.

Change-Id: I60bcc25cb853d2db3ee767a719b9ac54e421532e
2020-04-21 12:10:54 +02:00
Tristan Cacqueray 56ee80234c fetch-tox-output: introduce zuul_use_fetch_output
This change enables using fetch-tox role along with
the fetch-output role. By default the role still synchronizes
artifacts back to the executor.

Change-Id: Iffe5ffc52ee4c765b2e23ab8b3235b6bc7c510d8
2020-01-13 21:13:55 +00:00
Albin Vass 2ad252a217 Fixes tox log fetching when envlist is set to 'ALL'
Change-Id: I5cf5bbf44b9eb653856efb7e60561069f17a66d0
2019-11-28 12:24:16 +00:00
Andreas Jaeger 57fbc6e96e Do not use --ignore-missing-args for rsync
rsync --ignore-missing-args is only supported with rsync 3.1. CentOS 7
uses rsync 3.0 and fails.

We ignore missing remote files, so remove the argument and let the role
ignore an error if the files do not exist.

Update fetch-tox-output to use failed_when as well. We really want the
role not to fail (failed_when) instead of showing a failure and then the
playbook ignore it (ignore_errors).

Change-Id: I24bfb5519acccd7fd36b4839bb598436b4c8f01c
2017-12-20 15:04:42 +01:00
Tristan Cacqueray 53ff9f166e fetch-tox-output: remove --ignore-missing-args
This is no longer needed since the task errors are now ignored.
Moreover this option doesn't work on el7.

Change-Id: Ic6b32999eef2fa26d63ed5d34b3b05b3ade60b32
2017-12-05 09:20:49 +00:00
Ian Wienand 16eb6f1f3b Ignore missing .tox/env/logs directories for copy
Some tox users, such as dib-utils "tox -e functional" tests, don't
actually install a venv but just shell out to some commands.
Unfortunately, I'm not sure how to tell the difference between
intentionally missing logs like this, and what might be an
unintentional failure.  ignore_missing will allow this to run.

Change-Id: Iaa85a8326e746604966a9c1bb4cc85f44e92299b
2017-11-20 17:55:17 +11:00
Monty Taylor 33fc835f36
Ignore missing tox log directories
ironic-inspector redefines tox envdir, so the code to find the log files
from the environment fails. Add in an ignore to rsync so that files
being missing is not fatal.

Change-Id: Ie93af3569c13c57714e15bb6a9e852e44742662d
2017-10-16 10:18:31 -05:00
Monty Taylor d577763697
Add TODO note about reworking fetch-tox-output
The previous patch is a temporary workaround to unbreak some post jobs.
Defaulting this to venv is not the right way to handle that.

Change-Id: I275ca1fcb996514f6ef0f4ac990b0daa3f0e6f68
2017-10-03 12:41:40 -05:00
Monty Taylor 42835b0c31
Set default on fetch-tox-output to venv
The default in our usage is to look for venv. Let's set that correctly
here and circle back around and look for making 'all' work better.

Change-Id: If6fd028f6857a4f3e5b4564582ddc1b3bcbde96a
2017-10-03 08:39:30 -05:00
Monty Taylor 8d11a04914
Change in to work dir before executing tox
We can't execute tox if we're not in the dir.

Change-Id: I8b6785a99f8a95b2fd9eaaad5c376a837c81154a
2017-10-01 13:50:42 -05:00
Monty Taylor bece1aa241 Make fetch-tox-output more resilient
The current find command fails when there is an empty log directory
in the dist dir as seen here:

  http://logs.openstack.org/87/508287/1/check/openstack-tox-py27/4e00cb9/job-output.txt.gz#_2017-09-29_04_10_39_589261

Update it to make it look specifically for the tox environments
specified in tox_envlist.

Make sure it supports a comma separated list as well as 'all' in
tox_envlist, as those are stated valid inputs.

Depends-On: I1c98508fe227f7f6aa1d0b2f7dcf270cecaa60d8
Change-Id: Id28dbd19f4f612e3e9b9feb6350250b18ae2f8c6
2017-10-01 00:30:05 +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