tobiko/roles/tests/test_infrared_plugin.yaml
Federico Ressi a8fd02960c Ensure python-docutils package is installed
- Use IR fix for setuptools installation [1]
- Restore voting to 'tobiko-tox-infrared-centos-8' job

[1] https://review.gerrithub.io/c/redhat-openstack/infrared/+/501507

Change-Id: I04dafdae5cc62a4c470204e0ba816e9bde522aaf
2020-09-01 08:21:12 +02:00

64 lines
1.9 KiB
YAML

---
- hosts: primary
vars:
test_collect_dir: '{{ test_dir }}/test_results'
roles:
- role: tobiko-bindep
vars:
bindep_file: '{{ test_dir }}/bindep.txt'
- tobiko-ensure-tox
tasks:
- name: "remove '{{ test_collect_dir }}' dir"
file:
path: '{{ test_collect_dir }}'
state: absent
- name: "show ansible distro variables"
debug:
msg:
ansible_distribution: '{{ ansible_distribution }}'
ansible_distribution_major_version: '{{ ansible_distribution_major_version }}'
ansible_distribution_version: '{{ ansible_distribution_version }}'
ansible_os_family: '{{ ansible_os_family }}'
- name: "include platform variables"
include_vars: "{{ item }}"
ignore_errors: yes
with_first_found:
- "test-{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
- "test-{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
- "test-{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yaml"
- "test-{{ ansible_distribution }}.yaml"
- "test-{{ ansible_os_family }}.yaml"
register: include_platform_vars
- name: "run Tox InfraRed plugin"
command:
cmd: >
'{{ tox_executable }}' -e infrared --
--host secondary
--collect-dir '{{ test_collect_dir }}'
chdir: '{{ test_dir }}'
environment:
IR_DEPS: "{{ ir_deps | default('') }}"
ignore_errors: yes
register: run_tox
- name: "show Tox InfraRed plugin output"
debug: var=run_tox.stdout_lines
- name: "show Tox InfraRed plugin errors"
debug: var=run_tox.stderr_lines
when: run_tox is failed
failed_when: yes
- hosts: primary
vars:
test_collect_dir: '{{ test_dir }}/test_results'
roles:
- tobiko-check-collected-files