fix for rtd verfiy 83/29083/2
authorAric Gardner <agardner@linuxfoundation.org>
Mon, 20 Feb 2017 17:38:20 +0000 (12:38 -0500)
committerAric Gardner <agardner@linuxfoundation.org>
Mon, 20 Feb 2017 17:40:46 +0000 (12:40 -0500)
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 <agardner@linuxfoundation.org>
jjb/opnfvdocs/docs-rtd.yaml

index 151b535..d3d2187 100644 (file)
@@ -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:
 
     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