Merge "[docs] local docs building for missing submodules"
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Fri, 19 Oct 2018 19:13:24 +0000 (19:13 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Fri, 19 Oct 2018 19:13:24 +0000 (19:13 +0000)
1  2 
jjb/opnfvdocs/docs-rtd.yaml

      builders:
        - shell: |
            if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
-               cd docs/submodules/$GERRIT_PROJECT
+               # Temporary hacky solution to handle local builds for projects
+               # that already moved away from submodules
+               if ! cd docs/submodules/$GERRIT_PROJECT 2 > /dev/null; then
+                   rm -rf .* * 2 > /dev/null
+                   git clone ${{GIT_BASE/opnfvdocs/$GERRIT_PROJECT}} .
+               fi
                git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
 +              cd -
            else
                git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
            fi