Update docs build for non-multiversion
This job was not building/syncing all repos, due to an issue with
sphinx-multiversion. However, multiversion builds are not necessary,
so we will just build the branch to which a change is merged.
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Change-Id: I95348baf919516d96fee3b98db47f67d86178fc9
diff --git a/jjb/repos/voltha-docs.yaml b/jjb/repos/voltha-docs.yaml
index 0a85375..ead8a6f 100644
--- a/jjb/repos/voltha-docs.yaml
+++ b/jjb/repos/voltha-docs.yaml
@@ -28,8 +28,8 @@
- 'version-tag'
- 'sync-dir':
dependency-jobs: 'version-tag_voltha-docs'
- build-command: 'make multiversion'
- build-output-path: '_build/multiversion/'
+ build-command: 'make docs'
+ build-output-path: '_build/'
sync-target-server: 'static.opennetworking.org'
sync-target-path: '/srv/sites/docs.voltha.org/'
build-timeout: 60
diff --git a/jjb/shell/sync-dir.sh b/jjb/shell/sync-dir.sh
index 1623834..07f4d72 100644
--- a/jjb/shell/sync-dir.sh
+++ b/jjb/shell/sync-dir.sh
@@ -25,4 +25,8 @@
$BUILD_COMMAND
# sync the files to the target
-rsync -rvzh --delete-after --exclude=.git "$WORKSPACE/$BUILD_OUTPUT_PATH" "$SYNC_TARGET_SERVER:$SYNC_TARGET_PATH"
+rsync -rvzh --delete-after --exclude=.git "$WORKSPACE/$BUILD_OUTPUT_PATH/$GERRIT_BRANCH" \
+ "$SYNC_TARGET_SERVER:$SYNC_TARGET_PATH/$GERRIT_BRANCH"
+# Parent dir index.html will only be created on master build.
+rsync -vzh "$WORKSPACE/$BUILD_OUTPUT/index.html" \
+ "$SYNC_TARGET_SERVER:$SYNC_TARGET_PATH/index.html" || true