From 16a44deff6180c3788b68ad9ec0f1eaa58abf6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Dupr=C3=A9?= Date: Tue, 14 Nov 2023 11:41:31 +0100 Subject: [PATCH] playbooks: add a playbook to run all Cukinia's tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The playbook will run all tests defined in /etc/cukinia/cukinia.conf. Signed-off-by: Mathieu Dupré --- playbooks/ci_all_machines_tests.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 playbooks/ci_all_machines_tests.yaml 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