57fbc6e96e
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
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
- name: Set tox log path for multiple nodes
|
|
set_fact:
|
|
log_path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/tox"
|
|
when: groups['all'] | length > 1
|
|
|
|
- name: Set tox log path for single node
|
|
set_fact:
|
|
log_path: "{{ zuul.executor.log_root }}/tox"
|
|
when: log_path is not defined
|
|
|
|
- name: Ensure local tox dir
|
|
file:
|
|
path: "{{ log_path }}"
|
|
state: directory
|
|
delegate_to: localhost
|
|
|
|
- name: Set envlist fact
|
|
set_fact:
|
|
envlist: "{{ tox_envlist.split(',') }}"
|
|
when: tox_envlist is defined
|
|
|
|
- name: Find all environments
|
|
command: tox -l
|
|
args:
|
|
chdir: "{{ zuul_work_dir }}"
|
|
register: tox_environments
|
|
when: tox_envlist is not defined or tox_envlist == 'all'
|
|
|
|
- name: Set envlist fact
|
|
set_fact:
|
|
envlist: "{{ tox_environments.stdout_lines }}"
|
|
when: tox_envlist is not defined or tox_envlist == 'all'
|
|
|
|
- name: Collect tox logs
|
|
synchronize:
|
|
dest: "{{ log_path }}"
|
|
mode: pull
|
|
src: "{{ zuul_work_dir }}/.tox/{{ item }}/log/"
|
|
verify_host: true
|
|
with_items: "{{ envlist }}"
|
|
# some tox runs may not create a virtualenv and thus have
|
|
# no ./tox/env directory
|
|
failed_when: false
|