Switch output to publish-docs/html

Publishing to a top-level directory has a few challenges with some new
infra scripts. Let's keep those simple and change from publish-docs to
publish-docs/html.

this backports and adjust changes:
https://review.opendev.org/676913
https://review.opendev.org/676483
https://review.opendev.org/676482
https://review.opendev.org/676960

fix also git.openstack.org links so that guides build.

Depends-On: https://review.opendev.org/676489
Change-Id: I94b7bf915c0fdad0e9e2f5dd81846f45dc99194a
This commit is contained in:
Andreas Jaeger 2019-08-14 20:28:25 +02:00
parent f3e956e6b7
commit a93ed3809b
35 changed files with 67 additions and 94 deletions

View File

@ -8,17 +8,17 @@
description: |
Base job to build manual related documents. These build jobs
invoke a tox command and expect the published content to be in
publish-docs directory. This content is published on the root of
publish-docs/html directory. This content is published on the root of
the website.
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
success-url: publish-docs/
post-run: playbooks/build-manuals-tox/post.yaml
parent: opendev-tox-docs
success-url: publish-docs/html/
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:
@ -28,10 +28,10 @@
ZUUL_NEWREF: '{{ zuul.ref }}'
- job:
name: build-tox-manuals-checkbuild
name: build-tox-manuals-publishdocs
parent: build-tox-manuals
vars:
tox_envlist: checkbuild
tox_envlist: publishdocs
# Templates to easily group jobs.
- project-template:
@ -41,14 +41,14 @@
check:
jobs:
- openstack-tox-linters
- build-tox-manuals-checkbuild
- build-tox-manuals-publishdocs
gate:
jobs:
- openstack-tox-linters
- build-tox-manuals-checkbuild
post:
- build-tox-manuals-publishdocs
promote:
jobs:
- publish-openstack-manuals
- promote-openstack-manuals
# Configuration for this repository, determines which jobs to run.
- project:

View File

@ -29,7 +29,7 @@ service.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/cinder/plain/etc/cinder/api-paste.ini?h=mitaka-eol
https://opendev.org/openstack/cinder/raw/tag/mitaka-eol/etc/cinder/api-paste.ini
policy.json
~~~~~~~~~~~
@ -39,7 +39,7 @@ to the Block Storage service.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/cinder/plain/etc/cinder/policy.json?h=mitaka-eol
https://opendev.org/openstack/cinder/raw/tag/mitaka-eol/etc/cinder/policy.json
rootwrap.conf
~~~~~~~~~~~~~
@ -50,4 +50,4 @@ privileges to those of the root user.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/cinder/plain/etc/cinder/rootwrap.conf?h=mitaka-eol
https://opendev.org/openstack/cinder/raw/tag/mitaka-eol/etc/cinder/rootwrap.conf

View File

@ -7,4 +7,4 @@ The Compute service stores its API configuration settings in the
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/nova/plain/etc/nova/api-paste.ini?h=mitaka-eol
https://opendev.org/openstack/nova/raw/tag/mitaka-eol/etc/nova/api-paste.ini

View File

@ -7,4 +7,4 @@ that apply to the Compute service.
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/nova/plain/etc/nova/policy.json?h=mitaka-eol
https://opendev.org/openstack/nova/raw/tag/mitaka-eol/etc/nova/policy.json

View File

@ -12,4 +12,4 @@ to sudo only. Configure the ``disable_rootwrap`` option in the
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/nova/plain/etc/nova/rootwrap.conf?h=mitaka-eol
https://opendev.org/openstack/nova/raw/tag/mitaka-eol/etc/nova/rootwrap.conf

View File

@ -13,7 +13,7 @@ options:
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/keystone/plain/etc/keystone.conf.sample?h=mitaka-eol
https://opendev.org/openstack/keystone/raw/tag/mitaka-eol/etc/keystone.conf.sample
keystone-paste.ini
~~~~~~~~~~~~~~~~~~
@ -23,7 +23,7 @@ Interface (WSGI) middleware pipeline for the Identity service:
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/keystone/plain/etc/keystone-paste.ini?h=mitaka-eol
https://opendev.org/openstack/keystone/raw/tag/mitaka-eol/etc/keystone-paste.ini
logging.conf
~~~~~~~~~~~~
@ -36,7 +36,7 @@ For details, see the `Python logging module documentation
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/keystone/plain/etc/logging.conf.sample?h=mitaka-eol
https://opendev.org/openstack/keystone/raw/tag/mitaka-eol/etc/logging.conf.sample
policy.json
~~~~~~~~~~~
@ -46,4 +46,4 @@ the Identity service:
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/keystone/plain/etc/policy.json?h=mitaka-eol
https://opendev.org/openstack/keystone/raw/tag/mitaka-eol/etc/policy.json

View File

@ -9,4 +9,4 @@ You should not need to modify this file.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-api-paste.ini?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-api-paste.ini

View File

@ -9,4 +9,4 @@ This file must be modified after installation.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-api.conf?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-api.conf

View File

@ -7,4 +7,4 @@ are found in the ``glance-cache.conf`` file.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-cache.conf?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-cache.conf

View File

@ -15,4 +15,4 @@ are found in the ``glance-manage.conf`` file.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-manage.conf?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-manage.conf

View File

@ -7,4 +7,4 @@ The Image service's middleware pipeline for its registry is found in the
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-registry-paste.ini?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-registry-paste.ini

View File

@ -9,4 +9,4 @@ This file must be modified after installation.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-registry.conf?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-registry.conf

View File

@ -8,4 +8,4 @@ deleted. Its configuration is stored in the ``glance-scrubber.conf`` file.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-scrubber.conf?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-scrubber.conf

View File

@ -4,4 +4,4 @@ glance-swift.conf
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/glance-swift.conf.sample?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/glance-swift.conf.sample

View File

@ -11,4 +11,4 @@ from the ``CIM_ProcessorAllocationSettingData`` namespace,
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/glance/plain/etc/ovf-metadata.json.sample?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/ovf-metadata.json.sample

View File

@ -7,4 +7,4 @@ apply to the Image service.
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/glance/plain/etc/policy.json?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/policy.json

View File

@ -4,4 +4,4 @@ property-protections-policies.conf
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/property-protections-policies.conf.sample?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/property-protections-policies.conf.sample

View File

@ -4,4 +4,4 @@ property-protections-roles.conf
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/glance/plain/etc/property-protections-roles.conf.sample?h=mitaka-eol
https://opendev.org/openstack/glance/raw/tag/mitaka-eol/etc/property-protections-roles.conf.sample

View File

@ -29,7 +29,7 @@ gateway interface (WSGI).
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/neutron/plain/etc/api-paste.ini?h=mitaka-eol
https://opendev.org/openstack/neutron/raw/tag/mitaka-eol/etc/api-paste.ini
policy.json
~~~~~~~~~~~
@ -38,7 +38,7 @@ The ``policy.json`` defines API access policy.
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/neutron/plain/etc/policy.json?h=mitaka-eol
https://opendev.org/openstack/neutron/raw/tag/mitaka-eol/etc/policy.json
rootwrap.conf
~~~~~~~~~~~~~
@ -48,7 +48,7 @@ that require privilege escalation to execute.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/neutron/plain/etc/rootwrap.conf?h=mitaka-eol
https://opendev.org/openstack/neutron/raw/tag/mitaka-eol/etc/rootwrap.conf
Reference architecture plug-ins and agents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -22,4 +22,4 @@ Sample account server configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/account-server.conf-sample

View File

@ -20,4 +20,4 @@ Sample container sync reconciler configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-reconciler.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/container-reconciler.conf-sample

View File

@ -23,4 +23,4 @@ Sample container server configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/container-server.conf-sample

View File

@ -16,4 +16,4 @@ Sample container sync realms configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-sync-realms.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/container-sync-realms.conf-sample

View File

@ -20,4 +20,4 @@ Sample object expirer configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-expirer.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/object-expirer.conf-sample

View File

@ -22,4 +22,4 @@ Sample object server configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/object-server.conf-sample

View File

@ -29,4 +29,4 @@ Sample proxy server configuration file
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/swift/plain/etc/proxy-server.conf-sample?h=mitaka-eol
https://opendev.org/openstack/swift/raw/tag/mitaka-eol/etc/proxy-server.conf-sample

View File

@ -25,7 +25,7 @@ service.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/manila/plain/etc/manila/api-paste.ini?h=mitaka-eol
https://opendev.org/openstack/manila/raw/tag/mitaka-eol/etc/manila/api-paste.ini
policy.json
-----------
@ -35,7 +35,7 @@ to the Shared File Systems service.
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/manila/plain/etc/manila/policy.json?h=mitaka-eol
https://opendev.org/openstack/manila/raw/tag/mitaka-eol/etc/manila/policy.json
rootwrap.conf
-------------
@ -46,4 +46,4 @@ its privileges to those of the root user.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/manila/plain/etc/manila/rootwrap.conf?h=mitaka-eol
https://opendev.org/openstack/manila/raw/tag/mitaka-eol/etc/manila/rootwrap.conf

View File

@ -28,7 +28,7 @@ traits that operators may find useful.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/ceilometer/plain/etc/ceilometer/event_definitions.yaml?h=mitaka-eol
https://opendev.org/openstack/ceilometer/raw/tag/mitaka-eol/etc/ceilometer/event_definitions.yaml
pipeline.yaml
~~~~~~~~~~~~~
@ -42,7 +42,7 @@ generated by the Telemetry module.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/ceilometer/plain/etc/ceilometer/pipeline.yaml?h=mitaka-eol
https://opendev.org/openstack/ceilometer/raw/tag/mitaka-eol/etc/ceilometer/pipeline.yaml
event_pipeline.yaml
~~~~~~~~~~~~~~~~~~~
@ -56,7 +56,7 @@ where to publish the events.
.. remote-code-block:: ini
https://git.openstack.org/cgit/openstack/ceilometer/plain/etc/ceilometer/event_pipeline.yaml?h=mitaka-eol
https://opendev.org/openstack/ceilometer/raw/tag/mitaka-eol/etc/ceilometer/event_pipeline.yaml
policy.json
~~~~~~~~~~~
@ -66,4 +66,4 @@ to the Telemetry service.
.. remote-code-block:: json
https://git.openstack.org/cgit/openstack/ceilometer/plain/etc/ceilometer/policy.json?h=mitaka-eol
https://opendev.org/openstack/ceilometer/raw/tag/mitaka-eol/etc/ceilometer/policy.json

View File

@ -1,5 +0,0 @@
- hosts: all
roles:
- role: fetch-tox-output
- role: fetch-sphinx-output
sphinx_output_src: "{{ zuul.project.src_dir }}/publish-docs"

View File

@ -14,4 +14,4 @@ openstackdocstheme>=1.2.3,< 1.8.0
doc8 # Apache-2.0
requests>=2.10.0,!=2.12.2 # Apache-2.0
requestsexceptions>=1.1.1 # Apache-2.0
sphinxmark
sphinxmark <=0.1.17

View File

@ -1,6 +1,6 @@
#!/bin/bash -e
mkdir -p publish-docs
mkdir -p publish-docs/html
LINKCHECK=""
if [[ $# > 0 ]] ; then
@ -29,7 +29,7 @@ MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_BRANCH Build: $ZUUL_UUID Revision
for guide in user-guide admin-guide cli-reference networking-guide config-reference ; do
tools/build-rst.sh doc/$guide --build build \
--target "mitaka/$guide" $LINKCHECK
echo $MARKER_TEXT > publish-docs/mitaka/$guide/.root-marker
echo $MARKER_TEXT > publish-docs/html/mitaka/$guide/.root-marker
done
tools/build-install-guides-rst.sh $LINKCHECK

View File

@ -1,6 +1,6 @@
#!/bin/bash -e
mkdir -p publish-docs
mkdir -p publish-docs/html
TAGS=${1:-obs rdo ubuntu}
INDEX=doc/install-guide/source/index.rst
@ -44,5 +44,5 @@ for tag in $TAGS; do
tools/build-rst.sh doc/install-guide \
$GLOSSARY --tag ${tag} --target "mitaka/install-guide-${tag}" \
$LINKCHECK
echo $MARKER_TEXT > publish-docs/mitaka/install-guide-${tag}/.root-marker
echo $MARKER_TEXT > publish-docs/html/mitaka/install-guide-${tag}/.root-marker
done

View File

@ -18,7 +18,7 @@ if [ -z "$DIRECTORY" ] ; then
echo "usage $0 DIRECTORY options"
echo "Options are:"
echo "--tag TAG: Use given tag for building"
echo "--target TARGET: Copy files to publish-docs/$TARGET"
echo "--target TARGET: Copy files to publish-docs/html/$TARGET"
echo "--build BUILD: Name of build directory"
echo "--linkcheck: Check validity of links instead of building"
exit 1
@ -87,9 +87,9 @@ else
# Copy RST
if [ "$TARGET" != "" ] ; then
mkdir -p publish-docs/$TARGET
rsync -a $BUILD_DIR/ publish-docs/$TARGET/
mkdir -p publish-docs/html/$TARGET
rsync -a $BUILD_DIR/ publish-docs/html/$TARGET/
# Remove unneeded build artefact
rm -f publish-docs/$TARGET/.buildinfo
rm -f publish-docs/html/$TARGET/.buildinfo
fi
fi

View File

@ -19,34 +19,8 @@ if [[ -z "$PUBLISH" ]] ; then
exit 1
fi
# Copy files from draft to named branch and replace all links from
# draft with links to the branch
function copy_to_branch {
BRANCH=$1
if [ -e publish-docs/draft ] ; then
# Copy files over
mkdir -p publish-docs/$BRANCH
cp -a publish-docs/draft/* publish-docs/$BRANCH/
# We don't need this file
rm -f publish-docs/$BRANCH/draft-index.html
# We don't need these draft guides on the branch
rm -rf publish-docs/$BRANCH/arch-design-draft
rm -rf publish-docs/$BRANCH/ops-guide
for f in $(find publish-docs/$BRANCH -name "atom.xml"); do
sed -i -e "s|/draft/|/$BRANCH/|g" $f
done
for f in $(find publish-docs/$BRANCH -name "*.html"); do
sed -i -e "s|/draft/|/$BRANCH/|g" $f
done
# Debian Install Guide for Mitaka is not ready
rm -rf publish-docs/$BRANCH/install-guide-debian
fi
}
mkdir -p publish-docs
mkdir -p publish-docs/html
# Build all RST guides
tools/build-all-rst.sh
@ -72,5 +46,5 @@ tools/build-all-rst.sh
if [ "$PUBLISH" = "build" ] ; then
# Create index page for viewing
openstack-indexpage publish-docs
openstack-indexpage publish-docs/html
fi

10
tox.ini
View File

@ -82,6 +82,11 @@ sitepackages=True
whitelist_externals = doc-tools-check-languages
commands =
doc-tools-check-languages doc-tools-check-languages.conf test all
# Move from publish-docs to publish-docs/html
# TODO(AJaeger): Remove once openstack-doc-tools is updated
mkdir publish-docs-new
mv publish-docs publish-docs-new/html
mv publish-docs-new publish-docs
[testenv:buildlang]
# Run as "tox -e buildlang -- $LANG"
@ -103,10 +108,9 @@ whitelist_externals =
rmdir
commands =
doc-tools-check-languages doc-tools-check-languages.conf publish all
rmdir publish-docs/id publish-docs/ja
rmdir publish-docs/html/id publish-docs/html/ja
# Manually move files around
mv publish-docs/draft publish-docs/mitaka
mv publish-docs/draft publish-docs/html/mitaka
[testenv:generatepot-rst]
# Generate POT files for translation, needs {posargs} like: