From 4f25b964f9e523dabd2afe1273f2a1ae6f43b2a9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 20 Apr 2020 12:10:53 +0200 Subject: [PATCH] Fail fetch-sphinx-tarball if no html exists If no html is generated but a PDF, the role will succeed. This is wrong, we always need HTML for the publish step where the logic is: Publish HTML and optionally PDF. I run into this when updating tox.ini and breaking html output, the jobs passed but promote job failed. Change-Id: I44d15da4c8e1ec0d1f7284daed69dbf5caa40bf0 --- roles/fetch-sphinx-tarball/tasks/main.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/fetch-sphinx-tarball/tasks/main.yaml b/roles/fetch-sphinx-tarball/tasks/main.yaml index 8c2385124..cae46ce51 100644 --- a/roles/fetch-sphinx-tarball/tasks/main.yaml +++ b/roles/fetch-sphinx-tarball/tasks/main.yaml @@ -17,3 +17,10 @@ include_tasks: pdf.yaml # Other sphinx output processing can be added here. + +# Finally fail, if no html exists + +- name: Fail if no HTML exists + fail: + msg: 'No html output in "{{ sphinx_build_dir }}".' + when: "'html' not in sphinx_dir"