Enable Local Docs builds by using LF Docs Conf 23/54523/3
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Mon, 19 Mar 2018 22:09:06 +0000 (15:09 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 20 Apr 2018 23:25:39 +0000 (16:25 -0700)
The docs-conf[1] project will allow releng to have local docs builds
using the OPNFV theme while also not needing to duplicate the opnfvdocs
conf.py file.

[1] https://github.com/lfit/releng-docs-conf

Change-Id: I255faf045eccb363993af9dfb81b487e538cbb41
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
.gitignore
docs/conf.py [new file with mode: 0644]
docs/conf.yaml [new file with mode: 0644]
docs/requirements.txt [new file with mode: 0644]
tox.ini

index 4309e8e..7790d46 100644 (file)
@@ -5,6 +5,7 @@
 /releng/
 .idea
 *.py[cod]
+docs/_build/
 
 .Python
 env/
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..86ab8c5
--- /dev/null
@@ -0,0 +1 @@
+from docs_conf.conf import *  # flake8: noqa
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100644 (file)
index 0000000..749a4b1
--- /dev/null
@@ -0,0 +1,3 @@
+---
+project_cfg: opnfv
+project: releng
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644 (file)
index 0000000..f26b041
--- /dev/null
@@ -0,0 +1,3 @@
+lfdocs-conf
+sphinxcontrib-httpdomain
+sphinx-opnfv-theme
diff --git a/tox.ini b/tox.ini
index 6618a81..abdffc5 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py27
+envlist = jjb,docs,docs-linkcheck
 skipsdist = True
 
 [testenv]
@@ -18,3 +18,14 @@ deps =
   jenkins-job-builder==1.6.1
 commands=
   jenkins-jobs test -o job_output -r jjb/global:{posargs:"jjb/"}
+
+[testenv:docs]
+deps = -r{toxinidir}/docs/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 = -r{toxinidir}/docs/requirements.txt
+commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs {toxinidir}/docs/_build/linkcheck