[SDFAB-189] Update ONOS CI and test new image

Fix api docs upload. Upload is done now in the CI
script by using rsync (see ci-management)

Change-Id: I29f435850cb74a72b50288725dd6e9508783dbce
diff --git a/tools/build/onos-prepare-docs b/tools/build/onos-prepare-docs
new file mode 100755
index 0000000..b062264
--- /dev/null
+++ b/tools/build/onos-prepare-docs
@@ -0,0 +1,21 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# Uploads ONOS Java API docs.
+# -----------------------------------------------------------------------------
+
+set -e
+
+[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
+. $ONOS_ROOT/tools/build/envDefaults
+
+docs="bazel-bin/docs/external.jar"
+docs_path="bazel-bin/docs/tmp"
+mkdir -p ${docs_path}
+
+ONOS_VERSION_STRING=${ONOS_VERSION}
+if echo ${ONOS_VERSION_STRING} | grep -- '-b'; then
+    echo "ONOS version ${ONOS_VERSION_STRING} is a beta. Skipping"
+    exit 0
+fi
+
+unzip ${docs} -d ${docs_path}