summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2015-11-27 01:10:35 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2015-11-27 01:11:32 +0900
commitb928202fec472c218d8a9478783f3d4d11a7d740 (patch)
tree0e198db816306feeb850013c856e1d847c7965e8
parentca76032d637fe81ed3fce55ee5b76e125f01eabc (diff)
jjb: fix doc build to support old sample format
JIRA: RELENG-16 Change-Id: I4a3aea9e638c29fdcc44fc08304c5680d9a8aa45 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
-rw-r--r--jjb/releng-macros.yaml17
1 files changed, 12 insertions, 5 deletions
diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml
index 1f3da79ba..51a6ba60b 100644
--- a/jjb/releng-macros.yaml
+++ b/jjb/releng-macros.yaml
@@ -159,13 +159,20 @@
_get_title_script="
import os
- from docutils import core
+ from docutils import core, nodes
with open('index.rst', 'r') as file:
data = file.read()
- doctree = core.publish_doctree(data,
- settings_overrides={'report_level': 5,
- 'halt_level': 5})
- print doctree[0].astext()"
+ doctree = core.publish_doctree(data,
+ settings_overrides={'report_level': 5,
+ 'halt_level': 5})
+ if isinstance(doctree[0], nodes.title):
+ title = doctree[0]
+ else:
+ for c in doctree.children:
+ if isinstance(c, nodes.section):
+ title = c[0]
+ break
+ print title.astext()"
_git_sha1="$(git rev-parse HEAD)"
git clone ssh://gerrit.opnfv.org:29418/releng