From 8f28f2de1aa8a473be54295d58a2311b40617efb Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Mon, 20 Feb 2017 12:38:20 -0500 Subject: fix for rtd verfiy Do not recursively clone submodules rewrite submodule projects so that docs/ is project root so we do not build rst files not in docs/ Change-Id: I97d4ca915014dcf8923a44a0c31d3c27ac415885 Signed-off-by: Aric Gardner --- jjb/opnfvdocs/docs-rtd.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'jjb') diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index 151b53550..d3d218786 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -56,7 +56,7 @@ default: https://gerrit.opnfv.org/gerrit/opnfvdocs description: 'Git URL to use on this Jenkins Slave' scm: - - git-scm-with-submodules: + - git-scm-gerrit: branch: '{branch}' triggers: @@ -69,12 +69,19 @@ builders: - shell: | + git submodule update --init if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then cd docs/submodules/$GERRIT_PROJECT git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD - else - git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD fi + cd "$WORKSPACE" + for x in $(git submodule | awk '{{print $2}}'); + do + cd "$x" + git filter-branch --subdirectory-filter docs/ + cd - + done + - shell: | sudo pip install virtualenv virtualenv $WORKSPACE/venv -- cgit 1.2.3-korg