Add optional Sphinx build verification
We need a simple, togglable way to verify that Sphinx has, at a minimum, generated each of the files outlined within the `artcl_create_docs_payload.table_of_contents` and added them to the resulting index.html - Add togglable var to collect-logs role, `artcl_verify_sphinx_build` default to false - Update artcl_collect_dir to pull from common/defaults Change-Id: I76fef28a026730818d44274ab01741034f9fa40d
This commit is contained in:
parent
94e211723c
commit
4f8220735e
|
@ -43,8 +43,8 @@ artcl_collect_list:
|
|||
|
||||
### Documentation generation related
|
||||
|
||||
* `artcl_gen_docs`: true/false -- If true, the role will use build artifacts
|
||||
and Sphinx and produce user friendly documentation.
|
||||
* `artcl_gen_docs`: false/true -- If true, the role will use build artifacts
|
||||
and Sphinx and produce user friendly documentation (default: false)
|
||||
* `artcl_docs_source_dir` -- a local directory that serves as the Sphinx source
|
||||
directory.
|
||||
* `artcl_docs_build_dir` -- A local directory that serves as the Sphinx build
|
||||
|
@ -57,6 +57,9 @@ artcl_collect_list:
|
|||
included in the output documentation.
|
||||
* `table_of_contents` -- List that defines the order in which rST files
|
||||
will be laid out in the output documentation.
|
||||
* `artcl_verify_sphinx_build` -- false/true -- If true, verify items defined
|
||||
in `artcl_create_docs_payload.table_of_contents` exist in sphinx generated
|
||||
index.html (default: false)
|
||||
|
||||
```yaml
|
||||
artcl_create_docs_payload:
|
||||
|
|
|
@ -31,7 +31,7 @@ artcl_collect_list:
|
|||
- /home/stack/browbeat/results
|
||||
- /usr/share/openstack-tripleo-heat-templates
|
||||
- /tmp/tripleoclient*
|
||||
artcl_collect_dir: "{{ lookup('env', 'PWD') }}/collected_files"
|
||||
artcl_collect_dir: "{{ local_working_dir }}/collected_files"
|
||||
artcl_gzip_only: true
|
||||
artcl_tar_gz: false
|
||||
|
||||
|
@ -58,3 +58,4 @@ artcl_collect_sosreport: false
|
|||
artcl_gen_docs: false
|
||||
artcl_docs_source_dir: "{{ local_working_dir }}/usr/local/share/ansible/roles/collect-logs/docs/source"
|
||||
artcl_docs_build_dir: "{{ artcl_collect_dir }}/docs/build"
|
||||
artcl_verify_sphinx_build: false
|
||||
|
|
|
@ -14,3 +14,8 @@
|
|||
when:
|
||||
- artcl_publish|bool
|
||||
- not artcl_collect|bool
|
||||
|
||||
- name: Verify Sphinx build
|
||||
shell: grep "{{ item }}" "{{ artcl_collect_dir }}/docs/build/index.html"
|
||||
with_items: "{{ artcl_create_docs_payload.table_of_contents }}"
|
||||
when: artcl_verify_sphinx_build|bool
|
||||
|
|
Loading…
Reference in New Issue