summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2016-10-06 20:35:21 +0200
committerNish Patwa <nish.patwa@intel.com>2016-10-18 16:23:40 +0000
commitcb8203ad0326a28d08c7728e66d26f4816050cf2 (patch)
tree6bf206cf7b3504038f41f323cc0a294874978cab
parent1d82cdc5830452ab1c5c49448cc15d8aed588e89 (diff)
[DOCS] Added release-name as a watermark to Docs.
Added a water mark to the role documentation to make clear to deployers which release they're working with. Modified conf.py that adds watermark to the documentation according to particular branch. If the current branch is master than watermark is 'Pre-release' and if the current branch is stable/<release-name> than watermark is <release-name>. This is a combined implementation based on the following patches: - https://review.openstack.org/372565 - https://review.openstack.org/382637 - https://review.openstack.org/384140 Change-Id: Ic3201a200c52d1790103c30350ccfa9b84c6b425
Notes
Notes (review): Code-Review+2: Major Hayden <major@mhtx.net> Code-Review+2: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Workflow+1: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 19 Oct 2016 13:34:27 +0000 Reviewed-on: https://review.openstack.org/387514 Project: openstack/openstack-ansible-memcached_server Branch: refs/heads/master
-rw-r--r--doc/source/conf.py22
-rw-r--r--test-requirements.txt2
2 files changed, 21 insertions, 3 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 2bed75a..ed84948 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -23,6 +23,8 @@
23# serve to show the default. 23# serve to show the default.
24 24
25import pbr.version 25import pbr.version
26import os
27import openstackdocstheme
26 28
27# If extensions (or modules to document with autodoc) are in another directory, 29# If extensions (or modules to document with autodoc) are in another directory,
28# add these directories to sys.path here. If the directory is relative to the 30# add these directories to sys.path here. If the directory is relative to the
@@ -39,7 +41,8 @@ import pbr.version
39# ones. 41# ones.
40extensions = [ 42extensions = [
41 'sphinx.ext.autodoc', 43 'sphinx.ext.autodoc',
42 'oslosphinx' 44 'oslosphinx',
45 'sphinxmark'
43] 46]
44 47
45# Add any paths that contain templates here, relative to this directory. 48# Add any paths that contain templates here, relative to this directory.
@@ -129,7 +132,7 @@ todo_include_todos = False
129 132
130# The theme to use for HTML and HTML Help pages. See the documentation for 133# The theme to use for HTML and HTML Help pages. See the documentation for
131# a list of builtin themes. 134# a list of builtin themes.
132# html_theme = 'alabaster' 135html_theme = 'openstackdocs'
133 136
134# Theme options are theme-specific and customize the look and feel of a theme 137# Theme options are theme-specific and customize the look and feel of a theme
135# further. For a list of options available for each theme, see the 138# further. For a list of options available for each theme, see the
@@ -137,7 +140,7 @@ todo_include_todos = False
137# html_theme_options = {} 140# html_theme_options = {}
138 141
139# Add any paths that contain custom themes here, relative to this directory. 142# Add any paths that contain custom themes here, relative to this directory.
140# html_theme_path = [] 143html_theme_path = [openstackdocstheme.get_html_theme_path()]
141 144
142# The name for this set of Sphinx documents. If None, it defaults to 145# The name for this set of Sphinx documents. If None, it defaults to
143# "<project> v<release> documentation". 146# "<project> v<release> documentation".
@@ -303,3 +306,16 @@ texinfo_documents = [
303 306
304# If true, do not generate a @detailmenu in the "Top" node's menu. 307# If true, do not generate a @detailmenu in the "Top" node's menu.
305# texinfo_no_detailmenu = False 308# texinfo_no_detailmenu = False
309
310watermark = os.popen("git branch --contains $(git rev-parse HEAD)\
311| awk -F/ '/stable/ {print $2}'").read().strip(' \n\t').capitalize()
312if watermark == "":
313 watermark = "Pre-release"
314
315# -- Options for sphinxmark -----------------------------------------------
316sphinxmark_enable = True
317sphinxmark_div = 'docs-body'
318sphinxmark_image = 'text'
319sphinxmark_text = watermark
320sphinxmark_text_color = (128, 128, 128)
321sphinxmark_text_size = 70
diff --git a/test-requirements.txt b/test-requirements.txt
index 672f615..5217714 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -11,5 +11,7 @@ ndg-httpsclient>=0.4.2;python_version<'3.0' # BSD
11# this is required for the docs build jobs 11# this is required for the docs build jobs
12sphinx!=1.3b1,<1.4,>=1.2.1 # BSD 12sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
13oslosphinx>=4.7.0 # Apache-2.0 13oslosphinx>=4.7.0 # Apache-2.0
14openstackdocstheme>=1.5.0 # Apache-2.0
14doc8 # Apache-2.0 15doc8 # Apache-2.0
15reno>=1.8.0 # Apache2 16reno>=1.8.0 # Apache2
17sphinxmark>=0.1.14 # Apache-2.0