Keep error status in tox run

The line comments needs to run after the tox run so we set failed_when
to true. However this task won't be shown as failed in the log
then. Instead ignore errors to let the playbook continue and keep the
erorr status.

Change-Id: I6f2a4043de982aa3de6e0cc4eb489914fd5805c2
This commit is contained in:
Tobias Henkel 2020-04-01 21:31:42 +02:00
parent 47a04533a2
commit b758ca594a
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@
chdir: "{{ zuul_work_dir }}"
environment: "{{ tox_environment|combine(tox_constraints_env|default({})) }}"
command: "{{ tox_executable }} -e{{ tox_envlist }} {{ tox_extra_args }}"
failed_when: false
# Note: This intentionally ignores errors to give us the chance to look
# for file comments in the stdout. In case of an error this will be returned
# in a later task.
ignore_errors: yes
register: tox_output
- name: Look for output