diff --git a/README.rst b/README.rst index 41c511b7d..41f49f513 100644 --- a/README.rst +++ b/README.rst @@ -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 ========== diff --git a/tools/build-index.sh b/tools/build-index.sh index ec4abae6b..49fbe9fff 100755 --- a/tools/build-index.sh +++ b/tools/build-index.sh @@ -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 diff --git a/tox.ini b/tox.ini index c8b138b1e..569ab01d9 100644 --- a/tox.ini +++ b/tox.ini @@ -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 diff --git a/www/www-index.html b/www/www-index.html deleted file mode 100644 index 126c2b549..000000000 --- a/www/www-index.html +++ /dev/null @@ -1,9 +0,0 @@ - - -
-