From 3e97737e5ae4e6138f459bf2896d4f52df7d9f75 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 18 Sep 2019 06:40:08 +0900 Subject: [PATCH] Fetch generated PDF files correctly PDF files from openstackdocsstheme-tox-manuals-buildpdf(-starlingxpdf) jobs were not fetched after recent changes in the related zuul jobs. This commit merges 'buildpdf' tox env into the 'docs' tox env following the OpenStack PDF community goal convention. The same change is made for starlingxdocs theme. The .zuul.yaml file is updated accordingly. Change-Id: I0081f77a19b71b093b3debf91e85a42cf2053471 --- .zuul.yaml | 18 +----------------- doc/source/conf.py | 3 ++- tox.ini | 37 ++++++++++++++----------------------- 3 files changed, 17 insertions(+), 41 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 65493a6..89f9758 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,21 +1,9 @@ -# parent job is defined in openstack-manuals -- job: - name: openstackdocsstheme-tox-manuals-buildpdf - parent: build-tox-manuals-base - vars: - tox_envlist: buildpdf - -- job: - name: openstackdocsstheme-tox-manuals-buildpdf-starlingxpdf - parent: build-tox-manuals-base - vars: - tox_envlist: buildpdf-starlingxdocs - - job: name: openstack-tox-docs-starlingxdocs parent: openstack-tox-docs vars: tox_envlist: docs-starlingxdocs + tox_pdf_envlist: pdf-docs-starlingxdocs - project: templates: @@ -24,8 +12,6 @@ - release-notes-jobs-python3 check: jobs: - - openstackdocsstheme-tox-manuals-buildpdf - - openstackdocsstheme-tox-manuals-buildpdf-starlingxpdf - openstack-tox-pep8 - build-openstack-api-ref: # Override files section of the job so that this builds @@ -41,8 +27,6 @@ - openstack-tox-docs-starlingxdocs gate: jobs: - - openstackdocsstheme-tox-manuals-buildpdf - - openstackdocsstheme-tox-manuals-buildpdf-starlingxpdf - openstack-tox-pep8 - build-openstack-api-ref: files: diff --git a/doc/source/conf.py b/doc/source/conf.py index eeb15cc..9323cf4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -62,6 +62,7 @@ html_static_path = ['_static/css'] # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'os-doc-demo.tex', u'os-doc-demo Documentation', + ('index', 'doc-openstackdocstheme.tex', + u'OpenStack Docs Theme Documentation', u'OpenStack Contributors', 'manual'), ] diff --git a/tox.ini b/tox.ini index 5880792..4bbd5a9 100644 --- a/tox.ini +++ b/tox.ini @@ -27,18 +27,19 @@ commands = {posargs} [testenv:docs] basepython = python3 commands = - rm -rf doc/build api-ref/build + rm -rf doc/build/html doc/build/doctrees sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html [testenv:docs-starlingxdocs] basepython = python3 +envdir = {toxworkdir}/docs commands = - rm -rf doc/build api-ref/build + rm -rf doc/build/html doc/build/doctrees sphinx-build -a -E -W -d doc/build/doctrees -b html -D html_theme=starlingxdocs doc/source doc/build/html [testenv:html] commands = - rm -rf doc/build api-ref/build + rm -rf doc/build/html doc/build/doctrees api-ref/build sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html sphinx-build -a -E -W -d api-ref/build/doctrees -b html api-ref/source api-ref/build/html @@ -66,31 +67,21 @@ commands = rm -rf api-ref/build sphinx-build -a -E -W -d api-ref/build/doctrees -b html -D html_theme=starlingxdocs api-ref/source api-ref/build/html -[testenv:buildpdf] -# Only build PDF and push it to publish-docs folder so that OpenStack -# CI jobs will publish it. -whitelist_externals = - make - cp - mkdir +[testenv:pdf-docs] +basepython = python3 +envdir = {toxworkdir}/docs commands = - sphinx-build -a -E -W -d doc/build/doctrees -b latex doc/source doc/build/pdf + rm -rf doc/build/pdf + sphinx-build -a -E -W -b latex doc/source doc/build/pdf make -C doc/build/pdf - mkdir -p publish-docs - cp doc/build/pdf/os-doc-demo.pdf publish-docs -[testenv:buildpdf-starlingxdocs] -# Only build PDF and push it to publish-docs folder so that OpenStack -# CI jobs will publish it. -whitelist_externals = - make - cp - mkdir +[testenv:pdf-docs-starlingxdocs] +basepython = python3 +envdir = {toxworkdir}/docs commands = - sphinx-build -a -E -W -d doc/build/doctrees -b latex -D html_theme=starlingxdocs doc/source doc/build/pdf + rm -rf doc/build/pdf + sphinx-build -a -E -W -b latex -D html_theme=starlingxdocs doc/source doc/build/pdf make -C doc/build/pdf - mkdir -p publish-docs - cp doc/build/pdf/os-doc-demo.pdf publish-docs [testenv:bindep] # Do not install any requirements. We want this to be fast and work even if