Publish python-*client docs only on releases.
Modify the run-docs script to upload the latest tagged release docs to the root dir of a projects developer docs and to a dir for the tagged release. With this in place and the python-*client-docs jobs running only in the publish queue we will see documents at docs.openstack.org/developer that follow the latest releases for the client projects. Finally, re add the python-*client docs jobs as they were the projects that wanted this behavior in the first place. Fixes bug #1040251 Change-Id: Ia3cf07d860b10214ed54fcf9748330866cb47f5d Reviewed-on: https://review.openstack.org/13725 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
be56c251d6
commit
84b7f665a1
@ -14,14 +14,30 @@ export HUDSON_PUBLISH_DOCS=1
|
|||||||
tox -e$venv -- python setup.py build_sphinx
|
tox -e$venv -- python setup.py build_sphinx
|
||||||
result=$?
|
result=$?
|
||||||
if `echo $GERRIT_REFNAME | grep refs/tags/ >/dev/null` ; then
|
if `echo $GERRIT_REFNAME | grep refs/tags/ >/dev/null` ; then
|
||||||
|
# Put tagged releases in proper location. All tagged builds get copied to
|
||||||
|
# BUILD_DIR/tagname. If this is the latest tagged release the copy of files
|
||||||
|
# at BUILD_DIR remains. When Jenkins copies this file the root developer
|
||||||
|
# docs are always the latest release with older tags available under the
|
||||||
|
# root in the tagname dir.
|
||||||
TAG=`echo $GERRIT_REFNAME | sed 's/refs.tags.//'`
|
TAG=`echo $GERRIT_REFNAME | sed 's/refs.tags.//'`
|
||||||
if [ ! -z $TAG ] ; then
|
if [ ! -z $TAG ] ; then
|
||||||
|
LATEST=`git tag | sed -n '/^\([0-9]\+\.\?\)\+$/p' | sort -n | tail -1`
|
||||||
|
if [ "$TAG" = "$LATEST" ] ; then
|
||||||
|
# Copy the docs into a subdir if this is a tagged build
|
||||||
|
mkdir doc/build/$TAG
|
||||||
|
cp -R doc/build/html/* doc/build/$TAG
|
||||||
|
mv doc/build/$TAG doc/build/html/$TAG
|
||||||
|
else
|
||||||
# Move the docs into a subdir if this is a tagged build
|
# Move the docs into a subdir if this is a tagged build
|
||||||
mkdir doc/build/$TAG
|
mkdir doc/build/$TAG
|
||||||
mv doc/build/html/* doc/build/$TAG
|
mv doc/build/html/* doc/build/$TAG
|
||||||
mv doc/build/$TAG doc/build/html/$TAG
|
mv doc/build/$TAG doc/build/html/$TAG
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
elif `echo $GERRIT_REFNAME | grep stable/ >/dev/null` ; then
|
elif `echo $GERRIT_REFNAME | grep stable/ >/dev/null` ; then
|
||||||
|
# Put stable release changes in dir named after stable release under the
|
||||||
|
# build dir. When Jenkins copies these files they will be accessible under
|
||||||
|
# the developer docs root using the stable release's name.
|
||||||
BRANCH=`echo $GERRIT_REFNAME | sed 's/stable.//'`
|
BRANCH=`echo $GERRIT_REFNAME | sed 's/stable.//'`
|
||||||
if [ ! -z $BRANCH ] ; then
|
if [ ! -z $BRANCH ] ; then
|
||||||
# Move the docs into a subdir if this is a stable branch build
|
# Move the docs into a subdir if this is a stable branch build
|
||||||
|
@ -401,7 +401,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-cinderclient-sdist-tarball
|
- python-cinderclient-sdist-tarball
|
||||||
- python-cinderclient-coverage
|
- python-cinderclient-coverage
|
||||||
- python-cinderclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-cinderclient-pypi
|
- python-cinderclient-pypi
|
||||||
- python-cinderclient-docs
|
- python-cinderclient-docs
|
||||||
@ -426,7 +425,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-glanceclient-sdist-tarball
|
- python-glanceclient-sdist-tarball
|
||||||
- python-glanceclient-coverage
|
- python-glanceclient-coverage
|
||||||
- python-glanceclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-glanceclient-pypi
|
- python-glanceclient-pypi
|
||||||
- python-glanceclient-docs
|
- python-glanceclient-docs
|
||||||
@ -451,7 +449,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-keystoneclient-sdist-tarball
|
- python-keystoneclient-sdist-tarball
|
||||||
- python-keystoneclient-coverage
|
- python-keystoneclient-coverage
|
||||||
- python-keystoneclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-keystoneclient-pypi
|
- python-keystoneclient-pypi
|
||||||
- python-keystoneclient-docs
|
- python-keystoneclient-docs
|
||||||
@ -476,7 +473,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-novaclient-sdist-tarball
|
- python-novaclient-sdist-tarball
|
||||||
- python-novaclient-coverage
|
- python-novaclient-coverage
|
||||||
- python-novaclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-novaclient-pypi
|
- python-novaclient-pypi
|
||||||
- python-novaclient-docs
|
- python-novaclient-docs
|
||||||
@ -497,7 +493,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-openstackclient-sdist-tarball
|
- python-openstackclient-sdist-tarball
|
||||||
- python-openstackclient-coverage
|
- python-openstackclient-coverage
|
||||||
- python-openstackclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-openstackclient-pypi
|
- python-openstackclient-pypi
|
||||||
- python-openstackclient-docs
|
- python-openstackclient-docs
|
||||||
@ -522,7 +517,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-quantumclient-sdist-tarball
|
- python-quantumclient-sdist-tarball
|
||||||
- python-quantumclient-coverage
|
- python-quantumclient-coverage
|
||||||
- python-quantumclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-quantumclient-pypi
|
- python-quantumclient-pypi
|
||||||
- python-quantumclient-docs
|
- python-quantumclient-docs
|
||||||
@ -543,7 +537,6 @@ projects:
|
|||||||
post:
|
post:
|
||||||
- python-swiftclient-sdist-tarball
|
- python-swiftclient-sdist-tarball
|
||||||
- python-swiftclient-coverage
|
- python-swiftclient-coverage
|
||||||
- python-swiftclient-docs
|
|
||||||
publish:
|
publish:
|
||||||
- python-swiftclient-pypi
|
- python-swiftclient-pypi
|
||||||
- python-swiftclient-docs
|
- python-swiftclient-docs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user