Files
project-config/playbooks/publish/deploy-guide.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
807 B
YAML

- hosts: all
roles:
- prepare-docs-for-afs
doc_build_dir: "{{ zuul_work_dir }}/deploy-guide/build"
when: zuul_success | bool
- fetch-tox-output
- role: write-root-marker
root_marker_dir: "src/{{ zuul.project.canonical_name }}/deploy-guide/build/html"
when: zuul_success | bool
- role: fetch-sphinx-output
sphinx_output_src: "{{ zuul.project.src_dir }}/deploy-guide/build/html/"
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
when: zuul_success | bool
- hosts: localhost
roles:
- create-afs-token
when: zuul_success | bool
- role: upload-afs
afs_target: "{{ afs.path }}/project-deploy-guide/{{ zuul.project.short_name }}"
when: zuul_success | bool
- destroy-afs-token
when: zuul_success | bool