Pull submodules when running tox 23/23123/3
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 10 Nov 2017 10:31:53 +0000 (11:31 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 13 Nov 2017 09:47:34 +0000 (10:47 +0100)
Otherwise it only works via jjobs but tox is also designed for users.
It creates a new venv to ease testing it before integrating in jjobs.
The documentation is updated as well to refer to the new venv.

Issue-ID: DOC-159

Change-Id: Ida2ad14ebcf54ab776c2439dd83e74364432af46
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
docs/guides/onap-developer/how-to-use-docs/include-documentation.rst
tox.ini

index 4a7300d..15d71d4 100644 (file)
@@ -390,23 +390,15 @@ Download the DOC repository.
 
    git clone http://gerrit.onap.org/r/doc
 
-Change directory to docs & install requirements.
-
-.. code-block:: bash
-
-   cd doc
-   sudo pip install -r etc/requirements.txt
-
 Update submodules, build documentation using tox & then open using any browser.
 
 .. code-block:: bash
 
    cd doc
-   git submodule update --depth 1 --init
-   tox -edocs
+   tox -elocal
    firefox docs/_build/html/index.html
 
-.. note:: Make sure to run `tox -edocs` and not just `tox`.
+.. note:: Make sure to run `tox -elocal` and not just `tox`.
 
 
 
diff --git a/tox.ini b/tox.ini
index b9b1dcc..a352018 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,16 @@ commands =
     echo "Generated docs available in {toxinidir}/docs/_build/html"
 whitelist_externals = echo
 
+[testenv:local]
+deps = -r{toxinidir}/etc/requirements.txt
+commands =
+    git submodule update --depth 1 --init
+    sphinx-build -j 4 -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+    echo "Generated docs available in {toxinidir}/docs/_build/html"
+whitelist_externals =
+    echo
+    git
+
 [testenv:docs-linkcheck]
 deps = -r{toxinidir}/etc/requirements.txt
 commands = sphinx-build -j 4 -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck