summaryrefslogtreecommitdiffstats
path: root/docs/how-to-use-docs/local-build-transition.rst
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2018-06-04 14:36:44 +0200
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2018-08-03 12:14:11 -0700
commit8f28a9846b2ec7470004f3203a1d3b380855726e (patch)
treeaf6d60e9bc54851c2eb0db75b9a6f86def8200ab /docs/how-to-use-docs/local-build-transition.rst
parent30941c8136548e14ea5bb4486d3bea9d568c93bd (diff)
Submodule to RTD transition documentation
Adds documentation for current projects on how to migrate to using local doc builds, along with steps for new projects to setup their builds. Issue: DOCS-191 Change-Id: I1c850457dec1006199d095ad63469af1ca02a760 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'docs/how-to-use-docs/local-build-transition.rst')
-rw-r--r--docs/how-to-use-docs/local-build-transition.rst91
1 files changed, 91 insertions, 0 deletions
diff --git a/docs/how-to-use-docs/local-build-transition.rst b/docs/how-to-use-docs/local-build-transition.rst
new file mode 100644
index 000000000..415afe816
--- /dev/null
+++ b/docs/how-to-use-docs/local-build-transition.rst
@@ -0,0 +1,91 @@
+Submodule Transition
+====================
+
+Moving away from submodules.
+
+At the cost of some release-time overhead, there are several benefits
+the transition provides projects:
+
+* Local builds - Projects will be able to build and view there docs
+ locally, as they would appear on the OPNFV Docs website.
+* Reduced build time - Patchset verification will only run against
+ individual projects docs, not all projects.
+* Decoupled build failures - Any error introduced to project's docs
+ would not break builds for all the other projects
+
+Steps
+-----
+
+To make the transition the following steps need to be taken across the
+project repository, releng repository and opnfvdocs repository.
+
+In your project repo:
+
+#. Add the following files:
+
+ *docs/conf.py*
+
+ .. literalinclude:: files/conf.py
+
+ *docs/conf.yaml*
+
+ .. literalinclude:: files/conf.yaml
+
+ *docs/requirements.txt*
+
+ .. literalinclude:: files/requirements.txt
+
+ *tox.ini*
+
+ .. literalinclude:: files/tox.ini
+
+ *.gitignore*
+
+ .tox/
+ docs/_build/*
+
+ *docs/index.rst*
+
+ if it doesn't exist along with other index file for directories
+ (release, development)
+
+In the releng repository:
+
+#. Follow the steps in `this guide`_ from the Linux Foundation Releng team on
+ bootstrapping a new ReadTheDocs (RTD) project.
+
+ This will ensure RTD will update each time docs patches are merged to
+ the repository.
+
+.. note: In step 4 of the guide, the file this job should be added to is:
+ **jjb/project/project-jobs.yaml**, where project is the OPNFV project.
+
+.. _`this guide`: https://docs.releng.linuxfoundation.org/en/latest/project-documentation.html#bootstrap-a-new-project
+
+
+In the opnfvdocs repository:
+
+#. Add a intersphinx link to the opnfvdocs repo:
+
+ Here 'example' should be replaced with the name of your project.
+
+ .. code-block:: python
+ :name: docs/conf.py
+
+ intersphinx_mapping['example'] = ('http://opnfv-example.readthedocs.io', None)
+
+#. Ensure all references in opnfvdocs are using `:ref:` and not
+ directly specifying submodule files (No `:doc:` or 'submodules/...'
+ in `.. toctree:`)
+
+#. Remove the submodule from opnfvdocs::
+
+ diff --git a/.gitmodules b/.gitmodules
+ index 846ab245..aab01642 100644
+ --- a/.gitmodules
+ +++ b/.gitmodules
+ @@ -151,4 +150,0 @@
+ -[submodule "docs/submodules/releng"]
+ - path = docs/submodules/releng
+ - url = ../releng
+ - branch = master