From 85f7b0a7931644f65452972ee5ade10b98dc22d6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 Dec 2017 19:55:04 +0100 Subject: [PATCH] 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 --- roles/fetch-translation-output/tasks/main.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/fetch-translation-output/tasks/main.yaml b/roles/fetch-translation-output/tasks/main.yaml index e2d4a28d2..d62e7d708 100644 --- a/roles/fetch-translation-output/tasks/main.yaml +++ b/roles/fetch-translation-output/tasks/main.yaml @@ -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