tox: envlist bugfixes

Change-Id: I17e807aa544f6fb45e82604f35c027fe1f86c2f9
This commit is contained in:
Albin Vass 2020-05-22 19:33:27 +02:00 committed by Andreas Jaeger
parent 3b62d2d4b7
commit 58b291b5cf
2 changed files with 9 additions and 0 deletions

View File

@ -24,9 +24,17 @@
set_fact:
envlist: "{{ tox_envlist.split(',') }}"
when: tox_envlist is defined and tox_envlist != 'ALL' and tox_envlist
# tox version <= 3.13.2 throws an exception if
# tox -l is run and envlist is not set so set
# failed_when: false for any version below that
- name: Get tox version
command: "{{ tox_executable }} --version"
register: tox_version_output
- name: Find all default environments
command: "{{ tox_executable }} -l"
failed_when: "{{ tox_default_environments is failed and tox_version_output.stdout | regex_search('\\d+\\.\\d+\\.\\d+') is version('3.13.2', '>') }}"
args:
chdir: "{{ zuul_work_dir }}"
register: tox_default_environments

View File

@ -61,6 +61,7 @@
- name: Return file comments to Zuul
when:
- tox_inline_comments
- file_comments.file_comments is defined
- file_comments.file_comments
delegate_to: localhost
zuul_return: