diff --git a/ci/playbooks/kuttl/run-kuttl-tests.yml b/ci/playbooks/kuttl/run-kuttl-tests.yml index 9c277b255b..81c2c00cc0 100644 --- a/ci/playbooks/kuttl/run-kuttl-tests.yml +++ b/ci/playbooks/kuttl/run-kuttl-tests.yml @@ -52,6 +52,8 @@ ansible.builtin.include_role: name: 'install_yamls_makes' tasks_from: 'make_{{ operator }}_kuttl.yml' + register: kuttl_run_results + ignore_errors: true # noqa: ignore-errors - name: 'Get resource status after {{ operator }}_kuttl run' environment: @@ -88,3 +90,11 @@ mode: '0644' loop: "{{ _cifmw_kuttl_xml_files.files }}" ignore_errors: true # noqa: ignore-errors + +- name: Fail when any tests failed + ansible.builtin.assert: + that: + - item.rc != 0 + success_msg: "{{ item.cmd }} passed" + fail_msg: "{{ item.cmd }} failed" + loop: "{{ kuttl_run_results | default({}) | dict2items }}"