Merge "Use cached 'tox_executable' in fetch-tox-output"

This commit is contained in:
Zuul 2020-04-21 19:32:44 +00:00 committed by Gerrit Code Review
commit 9400fa6b65
4 changed files with 34 additions and 4 deletions

View File

@ -25,17 +25,24 @@
envlist: "{{ tox_envlist.split(',') }}"
when: tox_envlist is defined
- name: Find all environments
command: tox -l
- name: Find all default environments
command: "{{ tox_executable }} -l"
args:
chdir: "{{ zuul_work_dir }}"
register: tox_environments
when: tox_envlist is not defined or tox_envlist|lower == 'all'
when: tox_envlist is not defined
- name: Find all default environments
command: "{{ tox_executable }} -a"
args:
chdir: "{{ zuul_work_dir }}"
register: tox_environments
when: tox_envlist == 'ALL'
- name: Set envlist fact
set_fact:
envlist: "{{ tox_environments.stdout_lines }}"
when: tox_envlist is not defined or tox_envlist|lower == 'all'
when: tox_envlist is not defined or tox_envlist == 'ALL'
- name: Copy tox logs
copy:

View File

@ -35,6 +35,8 @@
tasks:
- import_role:
name: fetch-tox-output
vars:
tox_envlist: "ALL"
- block:
- name: Undo the log_path fact set by fetch-javascript-output

View File

@ -0,0 +1,17 @@
- hosts: all
name: Remove any pre-installed tox
tasks:
- name: Remove tox package with pip
shell: pip uninstall -y tox
become: true
failed_when: false
- name: Remove tox package with pip3
shell: pip3 uninstall -y tox
become: true
failed_when: false
- name: Verify tox is not installed
command: "tox --version"
register: result
failed_when: result.rc == 0
roles:
- ensure-tox

View File

@ -248,6 +248,10 @@
- roles/ensure-output-dirs/.*
- roles/fetch-tox-output/.*
- roles/fetch-output/.*
- roles/ensure-tox/.*
- test-playbooks/python/fetch-tox-output.yaml
- test-playbooks/tox/reinstall-tox.yaml
pre-run: test-playbooks/tox/reinstall-tox.yaml
run: test-playbooks/python/fetch-tox-output.yaml
vars:
zuul_use_fetch_output: true