debian-forge-composer/jenkins/test.yml
Major Hayden ee441afb14 🥊 Resilient testing + log gathering
Convert the bash script to an ansible playbook so we can gracefully
handle testing failures and gather logs reliably. Colorful output
is nice, too.

Signed-off-by: Major Hayden <major@redhat.com>
2020-04-22 11:44:20 +00:00

27 lines
No EOL
617 B
YAML

---
- hosts: localhost
vars:
passed_tests: []
failed_tests: []
journald_cursor: "{{ ansible_env.JOURNALD_CURSOR"
vars_files:
- vars.yml
tasks:
- name: Run osbuild-composer tests
include_tasks: test_runner.yml
loop: "{{ osbuild_composer_base_tests }}"
loop_control:
loop_var: test
- name: Show failed and passed tests
debug:
msg: |
Passed tests: "{{ passed_tests }}"
Failed tests: "{{ failed_tests }}"
- name: Fail the test run if a test failed
fail:
msg: One or more tests failed.
when: failed_tests