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
This commit is contained in:
@@ -3,14 +3,20 @@
|
|||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/api-guide/build/html"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/api-guide/build/html"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/api-guide/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/api-guide/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- set-service-type-data-fact
|
- set-service-type-data-fact
|
||||||
|
when: zuul_success | bool
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/api-guide/{{ service_type_data.service_type }}"
|
afs_target: "{{ afs.path }}/api-guide/{{ service_type_data.service_type }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -3,14 +3,20 @@
|
|||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/api-ref/build/html"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/api-ref/build/html"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/api-ref/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/api-ref/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- set-service-type-data-fact
|
- set-service-type-data-fact
|
||||||
|
when: zuul_success | bool
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/api-ref/{{ service_type_data.service_type }}"
|
afs_target: "{{ afs.path }}/api-ref/{{ service_type_data.service_type }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -3,13 +3,18 @@
|
|||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/doc/build/html"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/doc/build/html"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/doc/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/doc/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/contributors"
|
afs_target: "{{ afs.path }}/contributors"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -2,16 +2,22 @@
|
|||||||
roles:
|
roles:
|
||||||
- prepare-docs-for-afs
|
- prepare-docs-for-afs
|
||||||
doc_build_dir: "{{ zuul_work_dir }}/deploy-guide/build"
|
doc_build_dir: "{{ zuul_work_dir }}/deploy-guide/build"
|
||||||
|
when: zuul_success | bool
|
||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/deploy-guide/build/html"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/deploy-guide/build/html"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/deploy-guide/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/deploy-guide/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/project-deploy-guide/{{ zuul.project.short_name }}"
|
afs_target: "{{ afs.path }}/project-deploy-guide/{{ zuul.project.short_name }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/infra/{{ zuul.project.short_name }}"
|
afs_target: "{{ afs.path }}/infra/{{ zuul.project.short_name }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -3,13 +3,18 @@
|
|||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/docs-site/output"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/docs-site/output"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/docs-site/output/"
|
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/docs-site/output/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/infra"
|
afs_target: "{{ afs.path }}/infra"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/infra/manual"
|
afs_target: "{{ afs.path }}/infra/manual"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -2,16 +2,22 @@
|
|||||||
roles:
|
roles:
|
||||||
- prepare-docs-for-afs
|
- prepare-docs-for-afs
|
||||||
doc_build_dir: "{{ zuul_work_dir }}/install-guide/build"
|
doc_build_dir: "{{ zuul_work_dir }}/install-guide/build"
|
||||||
|
when: zuul_success | bool
|
||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/install-guide/build/html"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/install-guide/build/html"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/install-guide/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/install-guide/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/project-install-guide/{{ zuul.project.short_name }}"
|
afs_target: "{{ afs.path }}/project-install-guide/{{ zuul.project.short_name }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,10 +4,14 @@
|
|||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/publish-docs/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/publish-docs/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}"
|
afs_target: "{{ afs.path }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/{{ zuul.project.short_name }}"
|
afs_target: "{{ afs.path }}/{{ zuul.project.short_name }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/specs/output/"
|
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/specs/output/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
@@ -19,3 +20,4 @@
|
|||||||
src: "{{ zuul.executor.work_root }}/artifacts/"
|
src: "{{ zuul.executor.work_root }}/artifacts/"
|
||||||
dest: "/srv/static/specs/"
|
dest: "/srv/static/specs/"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
@@ -19,3 +20,4 @@
|
|||||||
src: "{{ zuul.executor.work_root }}/artifacts/"
|
src: "{{ zuul.executor.work_root }}/artifacts/"
|
||||||
dest: "/srv/static/specs/{{ zuul.project.name }}"
|
dest: "/srv/static/specs/{{ zuul.project.name }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -3,13 +3,18 @@
|
|||||||
- fetch-tox-output
|
- fetch-tox-output
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "src/{{ zuul.project.canonical_name }}/placement-api-ref/build/html"
|
root_marker_dir: "src/{{ zuul.project.canonical_name }}/placement-api-ref/build/html"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/placement-api-ref/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/placement-api-ref/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/api-ref/placement"
|
afs_target: "{{ afs.path }}/api-ref/placement"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,13 +4,18 @@
|
|||||||
tox_envlist: releasenotes
|
tox_envlist: releasenotes
|
||||||
- role: write-root-marker
|
- role: write-root-marker
|
||||||
root_marker_dir: "{{ zuul.project.src_dir }}/releasenotes/build/html/"
|
root_marker_dir: "{{ zuul.project.src_dir }}/releasenotes/build/html/"
|
||||||
|
when: zuul_success | bool
|
||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "{{ zuul.project.src_dir }}/releasenotes/build/html/"
|
sphinx_output_src: "{{ zuul.project.src_dir }}/releasenotes/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- create-afs-token
|
- create-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
- role: upload-afs
|
- role: upload-afs
|
||||||
afs_target: "{{ afs.path }}/releasenotes/{{ zuul.project.short_name }}"
|
afs_target: "{{ afs.path }}/releasenotes/{{ zuul.project.short_name }}"
|
||||||
|
when: zuul_success | bool
|
||||||
- destroy-afs-token
|
- destroy-afs-token
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
@@ -19,3 +20,4 @@
|
|||||||
src: "{{ zuul.executor.work_root }}/artifacts/"
|
src: "{{ zuul.executor.work_root }}/artifacts/"
|
||||||
dest: "/srv/static/service-types/"
|
dest: "/srv/static/service-types/"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
@@ -17,3 +18,4 @@
|
|||||||
copy:
|
copy:
|
||||||
src: "{{ zuul.executor.work_root }}/artifacts/"
|
src: "{{ zuul.executor.work_root }}/artifacts/"
|
||||||
dest: "{{ fileserver.path }}/{{ static_target }}/"
|
dest: "{{ fileserver.path }}/{{ static_target }}/"
|
||||||
|
when: zuul_success | bool
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
- role: fetch-sphinx-output
|
- role: fetch-sphinx-output
|
||||||
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
sphinx_output_src: "src/{{ zuul.project.canonical_name }}/doc/build/html/"
|
||||||
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
|
||||||
|
when: zuul_success | bool
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
@@ -16,3 +17,4 @@
|
|||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ zuul.executor.work_root }}/artifacts/"
|
src: "{{ zuul.executor.work_root }}/artifacts/"
|
||||||
dest: "{{ fileserver.path }}/{{ zuul.project.short_name }}/"
|
dest: "{{ fileserver.path }}/{{ zuul.project.short_name }}/"
|
||||||
|
when: zuul_success | bool
|
||||||
|
Reference in New Issue
Block a user