Use publish-docs for Zuul v3
With Zuul v2, the publishing happens from publish-docs/api-ref. Let's simplify our scripts and publish with Zuul v3 from publish-docs directly. Add new jobs publishlang and publishbuild for Zuul v3 publishing. Use existing publishlang-api and publishbuild-api for Zuul v2 publishing. Remove now obsolete comment from doc-tools-check-languages.conf. Change-Id: I32b29a34c571882cb4d7c542c543ea726e76a0b5
This commit is contained in:
parent
f679b56fdb
commit
9d230819a6
@ -1,24 +1,9 @@
|
|||||||
|
# Directories to be set up
|
||||||
# IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
|
|
||||||
# Note that we publish all files to developer.openstack.org using
|
|
||||||
# "tox -e publishlang-api".
|
|
||||||
|
|
||||||
# Our script doc-tools-check-languages places guides in the wrong
|
|
||||||
# directories, they need to be moved in tox.ini manually to the right
|
|
||||||
# place for publishing.
|
|
||||||
|
|
||||||
# We publish:
|
|
||||||
# The api-quick-start at:
|
|
||||||
# http:/developer.openstack.org/LANG/api-guide/quick-start
|
|
||||||
|
|
||||||
# directories to be set up
|
|
||||||
declare -A DIRECTORIES=(
|
declare -A DIRECTORIES=(
|
||||||
)
|
)
|
||||||
|
|
||||||
# books to be built
|
# books to be built
|
||||||
declare -A BOOKS=(
|
declare -A BOOKS=(
|
||||||
# See comment at start of file and update tox.ini as well if you
|
|
||||||
# change anything here.
|
|
||||||
["de"]="api-quick-start firstapp"
|
["de"]="api-quick-start firstapp"
|
||||||
["id"]="api-quick-start firstapp"
|
["id"]="api-quick-start firstapp"
|
||||||
["ja"]="api-quick-start"
|
["ja"]="api-quick-start"
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
mkdir -p publish-docs
|
mkdir -p publish-docs
|
||||||
|
|
||||||
tools/build-rst.sh api-quick-start --target api-ref/api-guide/quick-start
|
tools/build-rst.sh api-quick-start --target api-guide/quick-start
|
||||||
|
@ -5,11 +5,11 @@ mkdir -p publish-docs
|
|||||||
# Publish documents to api-ref for developer.openstack.org
|
# Publish documents to api-ref for developer.openstack.org
|
||||||
for tag in libcloud shade; do
|
for tag in libcloud shade; do
|
||||||
tools/build-rst.sh firstapp \
|
tools/build-rst.sh firstapp \
|
||||||
--tag ${tag} --target "api-ref/firstapp-${tag}"
|
--tag ${tag} --target "firstapp-${tag}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Draft documents
|
# Draft documents
|
||||||
for tag in dotnet fog openstacksdk pkgcloud jclouds gophercloud; do
|
for tag in dotnet fog openstacksdk pkgcloud jclouds gophercloud; do
|
||||||
tools/build-rst.sh firstapp \
|
tools/build-rst.sh firstapp \
|
||||||
--tag ${tag} --target "api-ref/draft/firstapp-${tag}"
|
--tag ${tag} --target "draft/firstapp-${tag}"
|
||||||
done
|
done
|
||||||
|
@ -34,18 +34,14 @@ if [ "$PUBLISH" = "build" ] ; then
|
|||||||
openstack-indexpage publish-docs
|
openstack-indexpage publish-docs
|
||||||
fi
|
fi
|
||||||
if [ "$PUBLISH" = "publish" ] ; then
|
if [ "$PUBLISH" = "publish" ] ; then
|
||||||
|
|
||||||
# Publication happens from publish-docs/api-ref to
|
|
||||||
# developer.openstack.org, so move content around
|
|
||||||
mkdir -p publish-docs/api-ref/
|
|
||||||
python tools/www-generator.py --source-directory www/ \
|
python tools/www-generator.py --source-directory www/ \
|
||||||
--output-directory publish-docs/api-ref/
|
--output-directory publish-docs/
|
||||||
rsync -a www/static/ publish-docs/api-ref/
|
rsync -a www/static/ publish-docs/
|
||||||
# Don't publish this file
|
# Don't publish this file
|
||||||
rm publish-docs/api-ref/www-index.html
|
rm publish-docs/www-index.html
|
||||||
|
|
||||||
# This marker is needed for infra publishing
|
# This marker is needed for infra publishing
|
||||||
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
|
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
|
||||||
echo $MARKER_TEXT > publish-docs/api-ref/.root-marker
|
echo $MARKER_TEXT > publish-docs/.root-marker
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash -xe
|
|
||||||
|
|
||||||
LANGDIR=$1
|
|
||||||
|
|
||||||
if [[ -z "$LANGDIR" ]] ; then
|
|
||||||
echo "usage $0 language"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Move all firstapp files for one language into the api-ref directory
|
|
||||||
# since that directory is used for publishing.
|
|
||||||
|
|
||||||
mkdir -p publish-docs/api-ref/$LANGDIR/
|
|
||||||
mv publish-docs/$LANGDIR/firstapp* publish-docs/api-ref/$LANGDIR/
|
|
58
tox.ini
58
tox.ini
@ -33,7 +33,7 @@ commands =
|
|||||||
# Build website index
|
# Build website index
|
||||||
{toxinidir}/tools/build-index.sh build
|
{toxinidir}/tools/build-index.sh build
|
||||||
|
|
||||||
[testenv:publishdocs-api]
|
[testenv:publishdocs]
|
||||||
# Prepare documents (without www) so that they can get published on
|
# Prepare documents (without www) so that they can get published on
|
||||||
# developer.openstack.org with just copying publish-docs/api-ref over.
|
# developer.openstack.org with just copying publish-docs/api-ref over.
|
||||||
commands =
|
commands =
|
||||||
@ -44,6 +44,22 @@ commands =
|
|||||||
# Build website index
|
# Build website index
|
||||||
{toxinidir}/tools/build-index.sh publish
|
{toxinidir}/tools/build-index.sh publish
|
||||||
|
|
||||||
|
[testenv:publishdocs-api]
|
||||||
|
# publishdocs will replace this, leave this in for transition
|
||||||
|
whitelist_externals =
|
||||||
|
mkdir
|
||||||
|
mv
|
||||||
|
commands =
|
||||||
|
{[testenv:publishdocs]commands}
|
||||||
|
# Now move everything to api-ref directory since that's where
|
||||||
|
# OpenStack CI expects it with this job.
|
||||||
|
# We need to move the content of publish-docs into publish-docs/api-ref.
|
||||||
|
# Tox does not allow us using wildcards here.
|
||||||
|
mkdir .newdir
|
||||||
|
# This renames publish-docs to api-ref
|
||||||
|
mv publish-docs .newdir/api-ref
|
||||||
|
mv .newdir publish-docs
|
||||||
|
|
||||||
[testenv:checklang]
|
[testenv:checklang]
|
||||||
whitelist_externals = doc-tools-check-languages
|
whitelist_externals = doc-tools-check-languages
|
||||||
commands = doc-tools-check-languages doc-tools-check-languages.conf test all
|
commands = doc-tools-check-languages doc-tools-check-languages.conf test all
|
||||||
@ -53,9 +69,9 @@ commands = doc-tools-check-languages doc-tools-check-languages.conf test all
|
|||||||
whitelist_externals = doc-tools-check-languages
|
whitelist_externals = doc-tools-check-languages
|
||||||
commands = doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
commands = doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
||||||
|
|
||||||
[testenv:publishlang-api]
|
[testenv:publishlang]
|
||||||
# Publish translated documents to developer.openstack.org with just
|
# Publish translated documents to developer.openstack.org with just
|
||||||
# copying publish-docs/api-ref over.
|
# copying publish-docs over.
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
doc-tools-check-languages
|
doc-tools-check-languages
|
||||||
mkdir
|
mkdir
|
||||||
@ -67,26 +83,22 @@ commands =
|
|||||||
# multiple times.
|
# multiple times.
|
||||||
rm -rf publish-docs
|
rm -rf publish-docs
|
||||||
doc-tools-check-languages doc-tools-check-languages.conf publish all
|
doc-tools-check-languages doc-tools-check-languages.conf publish all
|
||||||
# Move directories to proper place, we publish translated
|
|
||||||
# quick-start guides at
|
[testenv:publishlang-api]
|
||||||
# developer.openstack.org/LANG/api-guide/quick-start or
|
# publishlang will replace this, leave this in for transition
|
||||||
# developer.openstack.org/draft/LANG/api-guide/quick-start.
|
whitelist_externals =
|
||||||
mkdir -p publish-docs/api-ref
|
mkdir
|
||||||
mkdir -p publish-docs/api-ref/de/api-guide
|
mv
|
||||||
mkdir -p publish-docs/api-ref/id/api-guide
|
commands =
|
||||||
mkdir -p publish-docs/api-ref/ja/api-guide
|
{[testenv:publishlang]commands}
|
||||||
mkdir -p publish-docs/api-ref/ko_KR/api-guide
|
# Now move everything to api-ref directory since that's where
|
||||||
mkdir -p publish-docs/api-ref/tr_TR/api-guide
|
# OpenStack CI expects it with this job.
|
||||||
mkdir -p publish-docs/api-ref/zh_CN/api-guide
|
# We need to move the content of publish-docs into publish-docs/api-ref.
|
||||||
mv publish-docs/de/api-quick-start/ publish-docs/api-ref/de/api-guide/quick-start
|
# Tox does not allow us using wildcards here.
|
||||||
mv publish-docs/id/api-quick-start/ publish-docs/api-ref/id/api-guide/quick-start
|
mkdir .newdir
|
||||||
mv publish-docs/ja/api-quick-start/ publish-docs/api-ref/ja/api-guide/quick-start
|
# This renames publish-docs to api-ref
|
||||||
mv publish-docs/ko_KR/api-quick-start/ publish-docs/api-ref/ko_KR/api-guide/quick-start
|
mv publish-docs .newdir/api-ref
|
||||||
mv publish-docs/tr_TR/api-quick-start/ publish-docs/api-ref/tr_TR/api-guide/quick-start
|
mv .newdir publish-docs
|
||||||
mv publish-docs/zh_CN/api-quick-start/ publish-docs/api-ref/zh_CN/api-guide/quick-start
|
|
||||||
{toxinidir}/tools/mv-firstapp-trans.sh de
|
|
||||||
{toxinidir}/tools/mv-firstapp-trans.sh id
|
|
||||||
{toxinidir}/tools/mv-firstapp-trans.sh tr_TR
|
|
||||||
|
|
||||||
[testenv:generatepot-rst]
|
[testenv:generatepot-rst]
|
||||||
# Generate POT files for translation, needs {posargs} like:
|
# Generate POT files for translation, needs {posargs} like:
|
||||||
|
Loading…
Reference in New Issue
Block a user