Adds Admin User Guide build to tox file
- Uses -t admin_only tag for building the admin version of the user guide. - Add files to cli.rst that were not included anywhere. - Add flag -E to sphinx-build to ignore old content which might lead to strange local build bugs. - Add build-admin directory to .gitignore. - Fix scope.py extension to properly remove files from toctree. Co-Authored-By: Andreas Jaeger <aj@suse.de> Change-Id: Ide51cf83c148060d3064ebcb9535b3d3a29c83cf
This commit is contained in:
parent
85e87510df
commit
07540b4cf0
|
@ -7,6 +7,7 @@ target/
|
||||||
/publish-docs/
|
/publish-docs/
|
||||||
/www/output/
|
/www/output/
|
||||||
/generated/
|
/generated/
|
||||||
|
/doc/playground-user-guide/build-admin/
|
||||||
build/
|
build/
|
||||||
/build-*.log.gz
|
/build-*.log.gz
|
||||||
|
|
||||||
|
|
|
@ -91,4 +91,5 @@ service with its package name and description.
|
||||||
cli_manage_instances_hosts.rst
|
cli_manage_instances_hosts.rst
|
||||||
cli_provide_user_data_to_instances.rst
|
cli_provide_user_data_to_instances.rst
|
||||||
cli_set_quotas.rst
|
cli_set_quotas.rst
|
||||||
|
manage_projects_users_and_roles.rst
|
||||||
|
nova_cli_manage_projects_security.rst
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.. meta::
|
.. meta::
|
||||||
:scope: admin_only
|
:scope: admin_only
|
||||||
|
|
||||||
=======================
|
=======================
|
||||||
Manage project security
|
Manage project security
|
||||||
|
|
|
@ -49,7 +49,10 @@ def env_get_outdated(app, env, added, changed, removed):
|
||||||
|
|
||||||
def doctree_read(app, doctree):
|
def doctree_read(app, doctree):
|
||||||
for toctreenode in doctree.traverse(addnodes.toctree):
|
for toctreenode in doctree.traverse(addnodes.toctree):
|
||||||
|
to_remove = []
|
||||||
for e in toctreenode['entries']:
|
for e in toctreenode['entries']:
|
||||||
ref = str(e[1])
|
ref = str(e[1])
|
||||||
if ref in docs_for_admin:
|
if ref in docs_for_admin:
|
||||||
toctreenode['entries'].remove(e)
|
to_remove.append(e)
|
||||||
|
for e in to_remove:
|
||||||
|
toctreenode['entries'].remove(e)
|
||||||
|
|
21
tox.ini
21
tox.ini
|
@ -37,26 +37,33 @@ commands =
|
||||||
commands = openstack-doc-test --check-deletions {posargs}
|
commands = openstack-doc-test --check-deletions {posargs}
|
||||||
|
|
||||||
[testenv:checkbuild]
|
[testenv:checkbuild]
|
||||||
# Build first the www pages so that openstack-doc-test creates a link to
|
|
||||||
# www/www-index.html.
|
|
||||||
commands =
|
commands =
|
||||||
|
# Build first the www pages so that openstack-doc-test creates a link to
|
||||||
|
# www/www-index.html.
|
||||||
mkdir -p publish-docs/www
|
mkdir -p publish-docs/www
|
||||||
python tools/www-generator.py --source-directory www/ --output-directory publish-docs/www/
|
python tools/www-generator.py --source-directory www/ --output-directory publish-docs/www/
|
||||||
cp www/www-index.html publish-docs/
|
cp www/www-index.html publish-docs/
|
||||||
rsync -a www/static/ publish-docs/www/
|
rsync -a www/static/ publish-docs/www/
|
||||||
sphinx-build -W doc/playground-user-guide/source/ doc/playground-user-guide/build/html
|
# Build RST playground-user-guide
|
||||||
|
sphinx-build -E -W doc/playground-user-guide/source/ doc/playground-user-guide/build/html
|
||||||
mkdir -p publish-docs/playground-user-guide/content/
|
mkdir -p publish-docs/playground-user-guide/content/
|
||||||
rsync -a doc/playground-user-guide/build/html/ publish-docs/playground-user-guide/content/
|
rsync -a doc/playground-user-guide/build/html/ publish-docs/playground-user-guide/content/
|
||||||
sphinx-build -W doc/networking-guide/source doc/networking-guide/build/html
|
# Build RST user-guide-admincontent
|
||||||
|
sphinx-build -t admin_only -E -W doc/playground-user-guide/source/ doc/playground-user-guide/build-admin/html
|
||||||
|
mkdir -p publish-docs/playground-user-guide-admin/content/
|
||||||
|
rsync -a doc/playground-user-guide/build-admin/html/ publish-docs/playground-user-guide-admin/content/
|
||||||
|
# Build RST networking guide
|
||||||
|
sphinx-build -E -W doc/networking-guide/source doc/networking-guide/build/html
|
||||||
mkdir -p publish-docs/networking-guide/content/
|
mkdir -p publish-docs/networking-guide/content/
|
||||||
rsync -a doc/networking-guide/build/html/ publish-docs/networking-guide/content/
|
rsync -a doc/networking-guide/build/html/ publish-docs/networking-guide/content/
|
||||||
# Do not build DocBook XML Networking Guide
|
# Build DocBook Guides, note we do not build the DocBook XML Networking Guide
|
||||||
openstack-doc-test --check-build --ignore-book networking-guide {posargs}
|
openstack-doc-test --check-build --ignore-book networking-guide {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -W doc/playground-user-guide/source/ doc/playground-user-guide/build/html
|
sphinx-build -E -W doc/playground-user-guide/source/ doc/playground-user-guide/build/html
|
||||||
sphinx-build -W doc/networking-guide/source doc/networking-guide/build/html
|
sphinx-build -t admin_only -E -W doc/playground-user-guide/source/ doc/playground-user-guide/build-admin/html
|
||||||
|
sphinx-build -E -W doc/networking-guide/source doc/networking-guide/build/html
|
||||||
|
|
||||||
[testenv:network]
|
[testenv:network]
|
||||||
commands = sphinx-build -W doc/networking-guide/source doc/networking-guide/build/html
|
commands = sphinx-build -W doc/networking-guide/source doc/networking-guide/build/html
|
||||||
|
|
Loading…
Reference in New Issue