From: Aric Gardner Date: Mon, 20 Feb 2017 17:38:20 +0000 (-0500) Subject: fix for rtd verfiy X-Git-Tag: danube.1.0~242 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=commitdiff_plain;h=8f28f2de1aa8a473be54295d58a2311b40617efb 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 --- 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