diff --git a/playbooks/ci_all_machines_tests.yaml b/playbooks/ci_all_machines_tests.yaml new file mode 100644 index 000000000..c5e6083d0 --- /dev/null +++ b/playbooks/ci_all_machines_tests.yaml @@ -0,0 +1,26 @@ +# Copyright (C) 2023 Savoir-faire Linux, Inc. +# SPDX-License-Identifier: Apache-2.0 + +# Ansible playbook that runs all Cukinia's tests. + +--- +- hosts: "{{ machines_tested | default('cluster_machines') }}" + name: Cukinia tests + tasks: + - name: Create temporary Cukinia directory + tempfile: + state: directory + register: tmp_cukinia_dir + - name: Common tests + shell: + cmd: >- + MACHINENAME={{ cukinia_namespace | default(inventory_hostname) }} + cukinia -f junitxml -o {{ tmp_cukinia_dir.path }}/cukinia.xml + /etc/cukinia/cukinia.conf || true + - name: Fetch result + fetch: + src: '{{ tmp_cukinia_dir.path }}/cukinia.xml' + dest: >- + {{ cukinia_test_prefix | default('.') }}/all/{{ inventory_hostname + }}/cukinia.xml + flat: yes