Merge "[docs] Limit git submodule recurse to depth 1"
[releng.git] / jjb / opnfvdocs / docs-rtd.yaml
index e15b098..bfb9d63 100644 (file)
@@ -8,6 +8,8 @@
     stream:
       - master:
           branch: 'master'
+      - fraser:
+          branch: 'stable/{stream}'
       - danube:
           branch: 'stable/{stream}'
       - euphrates:
@@ -38,6 +40,7 @@
           files: 'docs/**/*.*'
 
     builders:
+      - 'remove-old-docs-from-opnfv-artifacts'
       - shell: |
           if [ $GERRIT_BRANCH == "master" ]; then
             RTD_BUILD_VERSION=latest
           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
+          sudo -H pip install virtualenv
           virtualenv $WORKSPACE/venv
           . $WORKSPACE/venv/bin/activate
           pip install --upgrade pip
           pip freeze
           pip install tox
+          sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini
           tox -edocs
+      - 'upload-review-docs'