[docs] Limit git submodule recurse to depth 1 33/62533/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 18 Sep 2018 20:55:59 +0000 (22:55 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 18 Sep 2018 20:58:14 +0000 (22:58 +0200)
Some projects (e.g. Fuel, Armband) embed their own git submodules,
which are picked up by Sphinx during RTD verify job, leading to a lot
of issues (e.g. duplicate labels since Armband includes Fuel as a git
submodule of its own).

Change-Id: I771f7c95334fc25c82cc8b14ee2064b043d9e321
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
jjb/opnfvdocs/docs-rtd.yaml

index ece8569..cb55fd2 100644 (file)
           if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
               cd docs/submodules/$GERRIT_PROJECT
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
+              cd -
           else
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
           fi
+          if [ -d docs/subdmodules ]; then
+              for project in docs/submodules/*; do
+                  cd $project && git submodule deinit -f . && cd -
+              done
+          fi
       - shell: |
           sudo pip install virtualenv
           virtualenv $WORKSPACE/venv