From 99920e8a49f0a2be881da517d45269c131ba5c42 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 14 Aug 2019 20:32:18 +0200 Subject: [PATCH] Use opendev-tox-docs job Switch our docs job to use opendev-tox-docs job as base so that we can publish later the content from gate directly (via promote queue) and do not need to rebuild in post again. Use the new promote-openstack-manuals job as first step in using promote publishing. The other publish jobs will be replaced separately. Use for building now publishdocs/publishlang so that we have exactly the same content in check and gate - and in the published website. For this, update tox.ini and publish script. Also, do not publish project-data. Depends-On: https://review.opendev.org/676489 Change-Id: I91f22173a4a6ed421f339833c486a31fd319dba3 --- .zuul.yaml | 16 +++++++++------- playbooks/build-manuals-tox/post.yaml | 5 ----- tools/publishdocs.sh | 2 +- tox.ini | 2 ++ 4 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 playbooks/build-manuals-tox/post.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 301a1c8f00..d3414dc2b8 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -14,13 +14,13 @@ Note that this build job does not create a root-marker file, this has to be done by scripts called from tox. - parent: openstack-tox + parent: opendev-tox-docs nodeset: ubuntu-bionic success-url: publish-docs/html/ - post-run: playbooks/build-manuals-tox/post.yaml roles: - zuul: zuul/zuul-jobs vars: + sphinx_build_dir: 'publish-docs' tox_environment: # The tox job writes the root-marker file directly and thus # needs the following variables set: @@ -30,20 +30,22 @@ ZUUL_NEWREF: '{{ zuul.ref }}' - job: + # TODO(AJaeger): Rename to publishdocs name: build-tox-manuals-checkbuild parent: build-tox-manuals-base description: | - Build manuals using "checkbuild" tox environment. + Build manuals using "publishdocs" tox environment. vars: - tox_envlist: checkbuild + tox_envlist: publishdocs - job: + # TODO(AJaeger): Rename to publishlang name: build-tox-manuals-checklang parent: build-tox-manuals-base description: | - Build translated manuals using "checklang" tox environment. + Build translated manuals using "publishlang" tox environment. vars: - tox_envlist: checklang + tox_envlist: publishlang files: - ^.*\.po$ - ^.*\.pot$ @@ -68,7 +70,7 @@ - build-tox-manuals-checkbuild post: jobs: - - publish-openstack-manuals + - promote-openstack-manuals - project-template: name: openstack-manuals-developer-jobs diff --git a/playbooks/build-manuals-tox/post.yaml b/playbooks/build-manuals-tox/post.yaml deleted file mode 100644 index c5cca53960..0000000000 --- a/playbooks/build-manuals-tox/post.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- hosts: all - roles: - - role: fetch-tox-output - - role: fetch-sphinx-output - sphinx_build_dir: 'publish-docs' diff --git a/tools/publishdocs.sh b/tools/publishdocs.sh index 6c4f98c26e..d98cba00ef 100755 --- a/tools/publishdocs.sh +++ b/tools/publishdocs.sh @@ -40,7 +40,7 @@ if [ "$PUBLISH" = "publish" ] ; then rsync -a www/static/ publish-docs/html/ # Don't publish these files rm publish-docs/html/www-index.html - rm publish-docs/html/redirect-tests.txt + rm -rf publish-docs/html/project-data fi if [ "$PUBLISH" = "build" ] ; then diff --git a/tox.ini b/tox.ini index fbb2031e30..1bb7fea6f4 100644 --- a/tox.ini +++ b/tox.ini @@ -55,6 +55,8 @@ commands = # over. commands = {toxinidir}/tools/publishdocs.sh publish + whereto publish-docs/html/.htaccess publish-docs/html/redirect-tests.txt + rm publish-docs/html/redirect-tests.txt [testenv:checklang] whitelist_externals = doc-tools-check-languages