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:
parent
8a82b1445a
commit
b04c695b2c
@ -45,7 +45,8 @@ install the Python tox package and run ``tox`` from the top-level directory.
|
|||||||
|
|
||||||
To run individual tests:
|
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
|
Contribute
|
||||||
==========
|
==========
|
||||||
|
@ -12,36 +12,12 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
PUBLISH=$1
|
|
||||||
|
|
||||||
if [[ -z "$PUBLISH" ]] ; then
|
|
||||||
echo "usage $0 (build|publish)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p publish-docs/html
|
mkdir -p publish-docs/html
|
||||||
|
|
||||||
# Build the www pages so that openstack-doc-test creates a link to
|
python tools/www-generator.py --source-directory www/ \
|
||||||
# www/www-index.html.
|
--output-directory publish-docs/html/
|
||||||
if [ "$PUBLISH" = "build" ] ; then
|
rsync -a www/static/ publish-docs/html/
|
||||||
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
|
|
||||||
|
|
||||||
# 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/html/.root-marker
|
echo $MARKER_TEXT > publish-docs/html/.root-marker
|
||||||
|
|
||||||
fi
|
|
||||||
|
12
tox.ini
12
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
envlist = checkbuild
|
envlist = publishdocs
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -17,19 +17,13 @@ whitelist_externals =
|
|||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:checkbuild]
|
|
||||||
basepython = python2
|
|
||||||
commands =
|
|
||||||
# Build website index
|
|
||||||
{toxinidir}/tools/build-index.sh build
|
|
||||||
|
|
||||||
[testenv:publishdocs]
|
[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 =
|
||||||
# Build website index
|
# Build website index
|
||||||
{toxinidir}/tools/build-index.sh publish
|
{toxinidir}/tools/build-index.sh
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/build-index.sh publish
|
{toxinidir}/tools/build-index.sh
|
||||||
|
@ -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>
|
|
Loading…
Reference in New Issue
Block a user