project-config/playbooks/publish/openstack-specs.yaml
Andreas Jaeger 30da877039 Do not publish docs when building fails
We just lost the docs.o.o index page: The tox run failed and only a
few files were ready. Since we delete existing content when pushing new,
this removed all our static pages.

Add a safe guard for all doc building: Only collect and publish
documents when we have build them with success. Add this to related
roles like creating/destroying afs as well.

Change-Id: Ife2496fe920bd40d52803705b409e6e621532254
2017-10-26 20:29:44 +02:00

24 lines
638 B
YAML

- hosts: all
roles:
- fetch-tox-output
- role: fetch-sphinx-output
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
when: zuul_success | bool
- hosts: localhost
roles:
- role: add-fileserver
fileserver: "{{ site_logs }}"
- hosts: "{{ site_logs.fqdn }}"
gather_facts: False
tasks:
- name: Upload specs to fileserver
synchronize:
src: "{{ zuul.executor.work_root }}/artifacts/"
dest: "/srv/static/specs/{{ zuul.project.name }}"
no_log: true
when: zuul_success | bool