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. Depends-On: https://review.opendev.org/676489 Change-Id: I94b7bf915c0fdad0e9e2f5dd81846f45dc99194a
This commit is contained in:
parent
7df391e2e5
commit
741d59c459
@ -9,14 +9,14 @@
|
||||
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
|
||||
nodeset: ubuntu-bionic
|
||||
success-url: publish-docs/
|
||||
success-url: publish-docs/html/
|
||||
post-run: playbooks/build-manuals-tox/post.yaml
|
||||
roles:
|
||||
- zuul: zuul/zuul-jobs
|
||||
|
@ -2,5 +2,4 @@
|
||||
roles:
|
||||
- role: fetch-tox-output
|
||||
- role: fetch-sphinx-output
|
||||
sphinx_output_dir: 'publish-docs'
|
||||
sphinx_build_dir: ''
|
||||
sphinx_build_dir: 'publish-docs'
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
mkdir -p publish-docs
|
||||
mkdir -p publish-docs/html
|
||||
|
||||
# Set this to a sensible value if not set by OpenStack CI.
|
||||
if [ -z "$ZUUL_BRANCH" ] ; then
|
||||
@ -43,5 +43,5 @@ done
|
||||
|
||||
# For master, just mark the root
|
||||
if [ "$ZUUL_BRANCH" = "master" ] ; then
|
||||
echo $MARKER_TEXT > publish-docs/.root-marker
|
||||
echo $MARKER_TEXT > publish-docs/html/.root-marker
|
||||
fi
|
||||
|
@ -17,7 +17,7 @@ DIRECTORY=$1
|
||||
if [ -z "$DIRECTORY" ] ; then
|
||||
echo "usage $0 DIRECTORY options"
|
||||
echo "Options are:"
|
||||
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"
|
||||
echo "--pdf: PDF file generation"
|
||||
@ -88,9 +88,9 @@ else
|
||||
|
||||
# Copy RST (and PDF)
|
||||
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
|
||||
|
@ -19,7 +19,7 @@ if [[ -z "$PUBLISH" ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p publish-docs
|
||||
mkdir -p publish-docs/html
|
||||
|
||||
# Build all RST guides including PDF files
|
||||
tools/build-all-rst.sh --pdf
|
||||
@ -28,22 +28,22 @@ tools/build-all-rst.sh --pdf
|
||||
# www/www-index.html.
|
||||
if [ "$PUBLISH" = "build" ] ; then
|
||||
python3 tools/www-generator.py --source-directory www/ \
|
||||
--output-directory publish-docs/www/
|
||||
rsync -a www/static/ publish-docs/www/
|
||||
# publish-docs/www-index.html is the trigger for openstack-indexpage
|
||||
--output-directory publish-docs/html/www/
|
||||
rsync -a www/static/ publish-docs/html/www/
|
||||
# publish-docs/html/www-index.html is the trigger for openstack-indexpage
|
||||
# to include the file.
|
||||
mv publish-docs/www/www-index.html publish-docs/www-index.html
|
||||
mv publish-docs/html/www/www-index.html publish-docs/html/www-index.html
|
||||
fi
|
||||
if [ "$PUBLISH" = "publish" ] ; then
|
||||
python3 tools/www-generator.py --source-directory www/ \
|
||||
--output-directory publish-docs --publish
|
||||
rsync -a www/static/ publish-docs/
|
||||
--output-directory publish-docs/html --publish
|
||||
rsync -a www/static/ publish-docs/html/
|
||||
# Don't publish these files
|
||||
rm publish-docs/www-index.html
|
||||
rm publish-docs/redirect-tests.txt
|
||||
rm publish-docs/html/www-index.html
|
||||
rm publish-docs/html/redirect-tests.txt
|
||||
fi
|
||||
|
||||
if [ "$PUBLISH" = "build" ] ; then
|
||||
# Create index page for viewing
|
||||
openstack-indexpage publish-docs
|
||||
openstack-indexpage publish-docs/html
|
||||
fi
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash -xe
|
||||
|
||||
if [[ -d publish-docs/www/ ]]; then
|
||||
output=publish-docs/www
|
||||
if [[ -d publish-docs/html/www/ ]]; then
|
||||
output=publish-docs/html/www
|
||||
else
|
||||
output=publish-docs/
|
||||
output=publish-docs/html/
|
||||
fi
|
||||
|
||||
.tox/checkbuild/bin/python tools/www-generator.py --verbose --source-directory www/ \
|
||||
@ -12,8 +12,8 @@ fi
|
||||
if [[ $? -eq 0 ]]; then
|
||||
rsync -a www/static/ $output
|
||||
fi
|
||||
# publish-docs/www-index.html is the trigger for openstack-indexpage
|
||||
# publish-docs/html/www-index.html is the trigger for openstack-indexpage
|
||||
# to include the file.
|
||||
#mv publish-docs/www/www-index.html publish-docs/www-index.html
|
||||
#mv publish-docs/html/www/www-index.html publish-docs/html/www-index.html
|
||||
|
||||
.tox/checkbuild/bin/whereto $output/.htaccess $output/redirect-tests.txt
|
||||
|
@ -127,7 +127,7 @@ def parse_command_line_arguments():
|
||||
parser.add_argument("--source-directory", type=str,
|
||||
default='www', help='Set source directory.')
|
||||
parser.add_argument("--output-directory", type=str,
|
||||
default='publish-docs/www',
|
||||
default='publishdocs/html/www',
|
||||
help='Set output directory.')
|
||||
parser.add_argument("--check-all-links", action="store_true",
|
||||
default=False,
|
||||
|
12
tox.ini
12
tox.ini
@ -32,7 +32,7 @@ commands =
|
||||
[testenv:checkbuild]
|
||||
commands =
|
||||
{toxinidir}/tools/publishdocs.sh build
|
||||
whereto publish-docs/www/.htaccess publish-docs/www/redirect-tests.txt
|
||||
whereto publish-docs/html/www/.htaccess publish-docs/html/www/redirect-tests.txt
|
||||
|
||||
[testenv:docs]
|
||||
commands =
|
||||
@ -60,6 +60,11 @@ commands =
|
||||
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"
|
||||
@ -71,6 +76,11 @@ commands =
|
||||
whitelist_externals = doc-tools-check-languages
|
||||
commands =
|
||||
doc-tools-check-languages doc-tools-check-languages.conf publish 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:generatepot-rst]
|
||||
# Generate POT files for translation, needs {posargs} like:
|
||||
|
Loading…
Reference in New Issue
Block a user