summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-24 21:21:10 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-24 21:31:30 +0200
commitbccc9e495f945bd4d834a1f3f7fbc527358e6900 (patch)
tree371ac8d861b1fabb49044a169b0a7d4193334254 /jjb/opnfvdocs
parentd01e4c56ce1bb8944ec8314670389ffbc4bc8bbc (diff)
[docs] local docs building for missing submodules
Some projects already moved away from OPNFV Docs git submodules. The proposed hack has a couple of problems: - it still downloads all of OPNFV docs + submodules (recursively!); - it uses Jenkins to handle gerrit clone/fetch, just to nuke it and clone the current project again; But: - it is a small change, to be replaced when global-jjb will support gsutil upload for docs preview; - it provides a locally built preview document instead of the old (complete) doc preview; Change-Id: I7426679187eb1cfabb181c59da61f3b794e50e5f Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'jjb/opnfvdocs')
-rw-r--r--jjb/opnfvdocs/docs-rtd.yaml7
1 files changed, 6 insertions, 1 deletions
diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml
index fc99bd392..c7988e63c 100644
--- a/jjb/opnfvdocs/docs-rtd.yaml
+++ b/jjb/opnfvdocs/docs-rtd.yaml
@@ -82,7 +82,12 @@
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