From bccc9e495f945bd4d834a1f3f7fbc527358e6900 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 24 Sep 2018 21:21:10 +0200 Subject: [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 --- jjb/opnfvdocs/docs-rtd.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'jjb') 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 -- cgit 1.2.3-korg