openqa: always fully re-load the test templates
I didn't do this originally because I was trying to make it only show changed when something had really changed, but it was too conservative - it wouldn't update when a test definition changed, only when one was added. Doing it manually is a bit annoying (you have to do the sed step and the ownership change) so it's better to let you just re-run the play to update the tests, even if it does mean getting the occasional spurious changed state.
This commit is contained in:
parent
b335baa92a
commit
7e2b87f99a
1 changed files with 6 additions and 4 deletions
|
@ -65,6 +65,7 @@
|
|||
git:
|
||||
repo: https://bitbucket.org/rajcze/openqa_fedora
|
||||
dest: /var/lib/openqa/share/tests/fedora
|
||||
register: gittests
|
||||
|
||||
- name: Have tests owned by geekotest
|
||||
file: path=/var/lib/openqa/share/tests/fedora owner=geekotest recurse=yes
|
||||
|
@ -172,10 +173,11 @@
|
|||
|
||||
- name: Patch repo URLs in templates
|
||||
shell: "cp /var/lib/openqa/share/tests/fedora/templates /tmp && sed -i -e 's,dl.fedoraproject,dl.phx2.fedoraproject,g' /tmp/templates"
|
||||
when: "gittests|changed"
|
||||
changed_when: "1 != 1"
|
||||
|
||||
# This will always show as changed, even when nothing in the templates
|
||||
# changed; this is a bit hard to fix
|
||||
- name: Load tests
|
||||
shell: "/tmp/templates | grep 'added => [1-9]'"
|
||||
register: templates
|
||||
changed_when: "templates.rc == 0"
|
||||
failed_when: "1 != 1"
|
||||
shell: "/tmp/templates --clean"
|
||||
when: "gittests|changed"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue