translations: Check for translation-source first

Translation jobs might not produce the translation-source directory but
still succeed, e.g. if the branch is not translated.

Check for the translation-source directory and only fetch files if there
is really something to fetch.

Change-Id: I064873412bf8503c5e7d317739adb891315038f8
This commit is contained in:
Andreas Jaeger 2017-12-15 19:55:04 +01:00 committed by Andreas Jaeger
parent 96006880a7
commit 85f7b0a793

View File

@ -1,6 +1,12 @@
- name: Check for translation files
stat:
path: "{{ translation_output_src }}"
register: translation_files
- name: Collect translation source files
synchronize:
dest: "{{ zuul_executor_dest }}"
mode: pull
src: "{{ translation_output_src }}"
verify_host: true
when: translation_files.stat.exists