Cleanup jobs

Follow job rename  in openstack-manuals, remove now unused
checkbuild environment and simplify build-index.sh script
since the same content is build everytime.

Also remove www/www-index.html, we do not use it anymore.

Depends-On: https://review.opendev.org/676956
Change-Id: I00b5afc14fc7872edc1c9db9a0aaa7949b1f1443
This commit is contained in:
Andreas Jaeger 2019-08-16 16:57:51 +02:00
parent 8a82b1445a
commit b04c695b2c
4 changed files with 11 additions and 49 deletions

View File

@ -45,7 +45,8 @@ install the Python tox package and run ``tox`` from the top-level directory.
To run individual tests:
* ``tox -e checkbuild`` - Builds all of the documents in this repository
* ``tox -e publishdocs`` - Builds all of the documents in this repository,
this is called from CI jobs.
Contribute
==========

View File

@ -12,36 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
PUBLISH=$1
if [[ -z "$PUBLISH" ]] ; then
echo "usage $0 (build|publish)"
exit 1
fi
mkdir -p publish-docs/html
# Build the www pages so that openstack-doc-test creates a link to
# www/www-index.html.
if [ "$PUBLISH" = "build" ] ; then
python tools/www-generator.py --source-directory www/ \
--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-doc-test
# to include the file.
mv publish-docs/html/www/www-index.html publish-docs/html/www-index.html
# Create index page for viewing
openstack-indexpage publish-docs/html
fi
if [ "$PUBLISH" = "publish" ] ; then
python tools/www-generator.py --source-directory www/ \
--output-directory publish-docs/html/
rsync -a www/static/ publish-docs/html/
# Don't publish this file
rm publish-docs/html/www-index.html
python tools/www-generator.py --source-directory www/ \
--output-directory publish-docs/html/
rsync -a www/static/ publish-docs/html/
# This marker is needed for infra publishing
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
echo $MARKER_TEXT > publish-docs/html/.root-marker
fi
# This marker is needed for infra publishing
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
echo $MARKER_TEXT > publish-docs/html/.root-marker

12
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
minversion = 1.6
envlist = checkbuild
envlist = publishdocs
skipsdist = True
[testenv]
@ -17,19 +17,13 @@ whitelist_externals =
[testenv:venv]
commands = {posargs}
[testenv:checkbuild]
basepython = python2
commands =
# Build website index
{toxinidir}/tools/build-index.sh build
[testenv:publishdocs]
# Prepare documents (without www) so that they can get published on
# developer.openstack.org with just copying publish-docs/api-ref over.
commands =
# Build website index
{toxinidir}/tools/build-index.sh publish
{toxinidir}/tools/build-index.sh
[testenv:docs]
commands =
{toxinidir}/tools/build-index.sh publish
{toxinidir}/tools/build-index.sh

View File

@ -1,9 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<body>
<ul>
<li><a href="www/index.html">/index.html</a></li>
</ul>
</body>
</html>