Merge "Add optional Sphinx build verification"

This commit is contained in:
Jenkins 2017-02-13 13:26:21 +00:00 committed by Gerrit Code Review
commit 39c3e4a7fd
3 changed files with 12 additions and 3 deletions

View File

@ -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:

View File

@ -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

View File

@ -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