[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
(cherry picked from commit dd14a4e6111c321b0252ea5555fabe0b7b4d22d2)
diff --git a/tools/build/onos-build-and-upload b/tools/build/onos-build-and-upload
index 1d66973..fdf3f92 100755
--- a/tools/build/onos-build-and-upload
+++ b/tools/build/onos-build-and-upload
@@ -19,8 +19,8 @@
 onos-release $VERSION $DRY_RUN
 
 if [ $dryRun -eq 0 ]; then
-    # upload docs
-    onos-upload-docs ${WIKI_USER}
+    # prepare docs
+    onos-prepare-docs
 
     # spot check that uploaded artifacts are correct
     # TODO - implement this for bazel
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}
diff --git a/tools/build/onos-upload-docs b/tools/build/onos-upload-docs
deleted file mode 100755
index 0e4320c..0000000
--- a/tools/build/onos-upload-docs
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/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
-
-user=${1:-${WIKI_USER:-$USER}}
-remote=$user@api.onosproject.org
-
-docs="bazel-bin/docs/external.jar"
-
-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
-
-scp $docs $remote:/tmp/onos-apidocs-$ONOS_VERSION.tar.gz
-ssh $remote "
-    mkdir -p /var/www/api/$ONOS_VERSION
-    cd /var/www/api/$ONOS_VERSION
-    unzip /tmp/onos-apidocs-$ONOS_VERSION.tar.gz
-"