
I added previously a check that makes docs job fail in post if there's no html output. This now leads to a POST_FAILURE when the normal build fails. So, a FAILURE turned into POST_FAILURE, see https://zuul.opendev.org/t/zuul/build/afbc8c39929a46039aa4d987971cdb4f . Update the check in the fetch-sphinx-tarball role that it only fails if the playbooks passed. Change-Id: Iebd0bffcc5caaa6df97d432a712d83b64db8e780
30 lines
748 B
YAML
30 lines
748 B
YAML
- name: Inspect sphinx build directory
|
|
find:
|
|
file_type: any
|
|
follow: true
|
|
paths: "{{ zuul_work_dir }}/{{ sphinx_build_dir }}"
|
|
register: sphinx_dir
|
|
|
|
- name: Parse sphinx build directory
|
|
set_fact:
|
|
sphinx_dir: "{{ sphinx_dir.files | map(attribute='path') | map('regex_replace', '^.*/(.*)$', '\\1') | list }}"
|
|
|
|
- name: Process sphinx HTML
|
|
when: "'html' in sphinx_dir"
|
|
include_tasks: html.yaml
|
|
|
|
- name: Process sphinx PDF
|
|
when: "'pdf' in sphinx_dir"
|
|
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:
|
|
- zuul_success | bool
|
|
- "'html' not in sphinx_dir"
|