[docs] Transition to local docs build job. 69/64869/1
authorEmma Foley <emma.l.foley@intel.com>
Sun, 9 Sep 2018 12:42:26 +0000 (13:42 +0100)
committerRex Lee <limingjiang@huawei.com>
Fri, 9 Nov 2018 13:01:34 +0000 (13:01 +0000)
Docs builds have transitioned to using local
build jobs. This allows Yardstick docs to be
built and verified locally.
The time taken to build and verify docs in the
gate for new changes should be reduced, as the
docs for each project will be built separately.

This change also allow contributers to test
their docs builds locally, using tox::

    tox -e docs
    tox -e docs-linkcheck

TODO: Update the dev guide to include new tox
environment

Related: DOCS-191
JIRA: YARDSTICK-1415
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Change-Id: Ib8bab85475dcd5127a2c41a2d55dce8f8d9da574
(cherry picked from commit 7203ff5925b805d07a5df53b6cdcf7d44cc4e4d1)

.gitignore
docs/conf.py [new file with mode: 0644]
docs/conf.yaml [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
docs/requirements.txt [new file with mode: 0644]
tox.ini

index 8be48ac..79e351f 100644 (file)
@@ -33,3 +33,5 @@ cover/
 .idea/
 # tox virtualenvs
 .tox/
+# docs build artifacts
+docs/_build/*
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..86fddf1
--- /dev/null
@@ -0,0 +1 @@
+from docs_conf.conf import *  # pylint: disable=wildcard-import
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100644 (file)
index 0000000..01e08ec
--- /dev/null
@@ -0,0 +1,3 @@
+---
+project_cfg: opnfv
+project: Yardstick
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..e1339b0
--- /dev/null
@@ -0,0 +1,17 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. SPDX-License-Identifier: CC-BY-4.0
+.. (c) Open Platform for NFV Project, Inc. and its contributors
+
+.. _yardstick:
+
+=========
+Yardstick
+=========
+
+.. toctree::
+   :numbered:
+   :maxdepth: 2
+
+   release/release-notes/index
+   testing/user/userguide/index
+   testing/developer/devguide/index
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644 (file)
index 0000000..4408435
--- /dev/null
@@ -0,0 +1,5 @@
+lfdocs-conf
+sphinx_opnfv_theme
+# Uncomment the following line if your project uses Sphinx to document
+# HTTP APIs
+# sphinxcontrib-httpdomain
diff --git a/tox.ini b/tox.ini
index 313f1ec..0162284 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -44,6 +44,17 @@ commands =
 basepython = python3
 commands = {[testenv:functional]commands}
 
+[testenv:docs]
+deps = -rdocs/requirements.txt
+commands =
+    sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+    echo "Generated docs available in {toxinidir}/docs/_build/html"
+whitelist_externals = echo
+
+[testenv:docs-linkcheck]
+deps = -rdocs/requirements.txt
+commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
 [testenv:os-requirements]
 commands =
     python {toxinidir}/tools/os-requirements-check.py {envdir}