integration: Use vars_files in plays

It's unsightly and hard to maintain collections of references and long
lists across multiple playbooks/include files.  Centralize them all
in ``vars.yml``, then include that in all plays.

Minor: Update all files with a newline at the start and end.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2017-09-26 07:27:18 -04:00
parent a30a118fe6
commit 493a72bbc9
13 changed files with 101 additions and 86 deletions

View file

@ -1,4 +1,5 @@
---
- name: Change test_runner.sh to use bats xunit output
lineinfile:
dest: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/test/test_runner.sh"
@ -21,7 +22,7 @@
- name: set extra shell for non-xunit tests
set_fact:
extra_shell_suffix: " >testout.txt 2>&1"
extra_shell_suffix: " &> {{ artifacts }}/testout.txt"
when: not xunit
- name: run integration tests
@ -35,16 +36,16 @@
- name: Make testing output directory
file:
path: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/reports"
path: "{{ artifacts }}"
state: directory
ignore_errors: yes
when: xunit
- name: Move all xunit files into one dir to scp
shell: "mv {{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/test/TestReport-bats*.xml {{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/reports/"
shell: "mv {{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-o/test/TestReport-bats*.xml {{ artifacts }}"
when: xunit
- name: ensure we fail on bad tests
fail:
msg: Integration tests failed!
when: "'not ok' in integration_test.stdout"
when: "'not ok' in integration_test.stdout"