diff --git a/deploy-guide/source/conf.py b/deploy-guide/source/conf.py index ddb13c9f68..83e2867ccf 100644 --- a/deploy-guide/source/conf.py +++ b/deploy-guide/source/conf.py @@ -248,14 +248,17 @@ latex_elements = { # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. - # 'preamble': '', + 'preamble': r''' + \setcounter{tocdepth}{3} + \let\cleardoublepage=\clearpage + ''', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, target_name + '.tex', + (master_doc, 'deploy-guide-' + target_name + '.tex', title, author, 'manual'), ] diff --git a/tox.ini b/tox.ini index f0cce38ca9..520fa8a77c 100644 --- a/tox.ini +++ b/tox.ini @@ -49,6 +49,14 @@ setenv = deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html +[testenv:deploy-guide-pdf-docs] +deps = {[testenv:deploy-guide]deps} +allowlist_externals = + make +commands = + sphinx-build -W --keep-going -b latex deploy-guide/source deploy-guide/build/pdf + make -C deploy-guide/build/pdf + [testenv:pdf-docs] deps = {[testenv:docs]deps} allowlist_externals = diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index f88b992579..534d306573 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -312,6 +312,25 @@ - ^ansible-role-requirements\.yml - ^inventory\/group_vars\/*\/source_git\.yml +# Deploy guide job + +- job: + name: openstack-ansible-build-openstack-deploy-guide + parent: build-openstack-deploy-guide + files: + - .gitreview + - ^deploy-guide/.* + - ansible-role-requirements.yml + - bindep.txt + - doc/requirements.txt + - test-requirements.txt + - tox.ini + vars: + tox_pdf_envlist: deploy-guide-pdf-docs + tox_skip_pdf: false + sphinx_pdf_files: + - "deploy-guide-{{ zuul.project.short_name }}.pdf" + # Ensuring hosts setup and healthcheck-hosts playbook is valid - job: name: openstack-ansible-deploy-hosts_lxc-validate diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml index 7e916692f8..9b6b2a4e99 100644 --- a/zuul.d/project-templates.yaml +++ b/zuul.d/project-templates.yaml @@ -316,20 +316,10 @@ using a promote job. check: jobs: - - build-openstack-deploy-guide: - files: &deploy-guide-triggers - - .gitreview - - ^deploy-guide/.* - - ansible-role-requirements.yml - - bindep.txt - - doc/requirements.txt - - test-requirements.txt - - tox.ini + - openstack-ansible-build-openstack-deploy-guide gate: jobs: - - build-openstack-deploy-guide: - files: *deploy-guide-triggers + - openstack-ansible-build-openstack-deploy-guide promote: jobs: - - promote-deploy-guide: - files: *deploy-guide-triggers + - openstack-ansible-build-openstack-deploy-guide