[docs] local docs building for missing submodules
[releng.git] / jjb / opnfvdocs / docs-rtd.yaml
index fc99bd3..c7988e6 100644 (file)
     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
           else
               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD