ara-infra/tests/integration-post.yaml

38 lines
1.2 KiB
YAML

---
# Copyright (c) 2018 Red Hat, Inc.
#
# This file is part of ARA Records Ansible.
#
# ARA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ARA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
- name: Integration tests post-run
hosts: all
gather_facts: yes
tasks:
- name: Create server log directory
file:
path: "{{ ansible_user_dir }}/workspace/logs"
state: directory
recurse: yes
- name: Recover integration test data
command: cp -rp /tmp/ara-integration-tests/data {{ ansible_user_dir }}/workspace/logs/data
- name: Upload log artifacts
synchronize:
src: "{{ ansible_user_dir }}/workspace/logs"
dest: "{{ zuul.executor.log_root }}"
mode: pull
verify_host: true