diff --git a/ci/playbooks/kuttl/run-kuttl-tests.yml b/ci/playbooks/kuttl/run-kuttl-tests.yml index 9c277b255b..e874ed9f2e 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' + apply: + ignore_errors: true # noqa: ignore-errors - name: 'Get resource status after {{ operator }}_kuttl run' environment: @@ -88,3 +90,14 @@ mode: '0644' loop: "{{ _cifmw_kuttl_xml_files.files }}" ignore_errors: true # noqa: ignore-errors + +# Note: the variable checked here is set by the specific autogenerated task +# for the autogenerated install_yamls_makes role. +- name: Fail when any tests failed + vars: + _kuttl_curr_operator_result: "{{ lookup('vars', 'make_' + operator + '_kuttl_status')|default(1) }}" + ansible.builtin.assert: + that: + - _kuttl_curr_operator_result.rc == 0 + success_msg: "KUTTL tests for {{ operator }} passed" + fail_msg: "KUTTL tests for {{ operator }} failed"