diff options
author | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2016-01-07 20:02:42 +0900 |
---|---|---|
committer | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2016-01-07 20:02:42 +0900 |
commit | 97396b21dd66a622dad5548c364159c973d82303 (patch) | |
tree | 9c1daa2e87c0e7607cb5fbf6ed8ceefc9390d134 /jjb/opnfvdocs | |
parent | 86e44daad61a306f48f8fdfa7c62c66ffdc7cd2d (diff) |
make builder for composite docs generate links
Change-Id: I6015790e2cdeacf2656b094817eb253e23937518
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'jjb/opnfvdocs')
-rw-r--r-- | jjb/opnfvdocs/opnfvdocs.yml | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index 9238a8d3d..87648c1d5 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -152,6 +152,10 @@ - builder: name: clone-opnfv-repos + + # TODO(r-mibu): fix job name which is not relevant anymore + # AND move this script into opnfvdocs repo + builders: - shell: | #!/bin/bash @@ -169,19 +173,35 @@ # clone releng repo to get repo list echo "Cloning releng repo" git clone $GIT_CLONE_BASE/releng --branch master --depth 1 --quiet + repos=$(grep -v '^#' $WORKSPACE/releng/jjb/opnfvdocs/project.cfg | sort) echo echo "Cloning repos of participating OPNFV Projects and copying docs" echo echo "--------------------------------------------------------" - for repo in $(grep -v '^#' $WORKSPACE/releng/jjb/opnfvdocs/project.cfg | sort); do + for repo in $repos; do echo " $repo ($GERRIT_BRANCH)" git clone $GIT_CLONE_BASE/$repo --branch $GERRIT_BRANCH --depth 1 --quiet cp -r $repo/docs $WORKSPACE/docs/projects/$repo done echo "--------------------------------------------------------" echo - echo "Done" + + echo "Creating document links" + for guide in configguide userguide + do + link_list=$WORKSPACE/docs/$guide/projects-$guide.rst + for repo in $repos + do + file=projects/$repo/$guide/$guide.rst + [[ -e $WORKSPACE/docs/$file ]] || continue + echo "" >> $link_list + echo "$repo:" >> $link_list + echo ".. include:: ../$file" >> $link_list + done + done popd rm -rf $tmp + + echo "Done" |