Starting to switch aliases and some convenience scripts from Buck to Bazel.

Change-Id: I2e0a0dac882af430b8628174f3f97a1777d3e643
diff --git a/tools/build/onos-blackduck-zip b/tools/build/onos-blackduck-zip
deleted file mode 100755
index 8760460..0000000
--- a/tools/build/onos-blackduck-zip
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/bash
-# -----------------------------------------------------------------------------
-# Packages specific ONOS codebase with specific tag or branch
-# -----------------------------------------------------------------------------
-
-# Bail on any errors
-set -e
-
-# Initialize environment variables
-init() {
-    # Check if ONOS_ROOT is defined
-    [ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1;
-
-    # Setup some environmental context for developers
-    if [ -z "${JAVA_HOME}" ]; then
-        if [ -x /usr/libexec/java_home ]; then
-            export JAVA_HOME=$(/usr/libexec/java_home -v 1.8);
-        elif [ -d /usr/lib/jvm/java-8-oracle ]; then
-            export JAVA_HOME="/usr/lib/jvm/java-8-oracle";
-        elif [ -d /usr/lib/jvm/java-8-openjdk-amd64 ]; then
-            export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64";
-        fi
-    fi
-    # Check if mvn exists
-    command -v mvn >/dev/null 2>&1 || {
-    # Following the convention, the default location of maven shows as below.
-    MAVEN=${MAVEN:-~/Applications/apache-maven-3.3.9};
-    export PATH="$MAVEN/bin:$PATH";
-    }
-}
-
-# checkout $TAG, build project and copy it to other location
-check_copy() {
-    CHECK_TAG=`git checkout $TAG`
-    if [[ $CHECK_TAG =~ "error" ]]; then
-        echo "There is no branch or tag named $TAG in $ONOS_ROOT" >&2 && exit 1
-    fi
-    FOLDER=$CURRENT_PATH/onos-$TAG-blackduck
-    [ -d "$FOLDER" ] && rm -r $FOLDER
-    mkdir $FOLDER
-    mvn clean install
-    if [ $? -eq 0 ]; then
-        cp -r -a * $FOLDER;
-        if [ -d "$FOLDER/.git" ]; then
-         rm -r $FOLDER/.git
-        fi;
-    else
-        git checkout $CURRENT_TAG;
-        rm -r $FOLDER
-        echo "mvn compilation failed"
-    fi
-}
-
-# Script entry point
-CURRENT_PATH=`pwd`
-TAG=${1:-'master'}
-
-init
-cd $ONOS_ROOT
-CURRENT_TAG=`git branch | awk '{print $2}'`
-check_copy
-cd $FOLDER
-zip -rq -m $CURRENT_PATH/onos-$TAG-blackduck.zip *
-cd ..
-rm -r $FOLDER
-
-cd $ONOS_ROOT
-git checkout $CURRENT_TAG
diff --git a/tools/build/onos-build b/tools/build/onos-build
index b3ff8d4..ef00940 100755
--- a/tools/build/onos-build
+++ b/tools/build/onos-build
@@ -3,5 +3,4 @@
 # Builds the ONOS from source.
 # -----------------------------------------------------------------------------
 
-[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
-cd $ONOS_ROOT && onos-buck build onos && onos-buck test --only-failing
+SHLVL=1 bazel build //:onos
diff --git a/tools/build/onos-build-docs b/tools/build/onos-build-docs
index cdac83f..3be4c0a 100755
--- a/tools/build/onos-build-docs
+++ b/tools/build/onos-build-docs
@@ -1,11 +1,6 @@
 #!/bin/bash
 # -----------------------------------------------------------------------------
-# Builds the ONOS Java API docs.
+# Builds the aggregate ONOS Java API docs.
 # -----------------------------------------------------------------------------
 
-set -e
-
-[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
-. $ONOS_ROOT/tools/build/envDefaults
-
-onos-buck build //docs:external //docs:internal --show-output
+SHLVL=1 bazel build //docs:external //docs:internal
diff --git a/tools/build/onos-package b/tools/build/onos-package
index 9d3a747..aaa717a 100755
--- a/tools/build/onos-package
+++ b/tools/build/onos-package
@@ -1,7 +1,6 @@
 #!/bin/bash
 # -----------------------------------------------------------------------------
-# Packages ONOS distributable into onos.tar.gz, onos.zip or a deb file
+# Packages ONOS distributable into onos.tar.gz file
 # -----------------------------------------------------------------------------
 
-[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
-cd $ONOS_ROOT && onos-buck build onos --deep --show-output && onos-check-bits
+SHLVL=1 bazel build //:onos && onos-check-bits
diff --git a/tools/build/onos-package-test b/tools/build/onos-package-test
deleted file mode 100755
index 3f4fd41..0000000
--- a/tools/build/onos-package-test
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-# -----------------------------------------------------------------------------
-# Packages ONOS test facilities into onos-test.tar.gz
-# -----------------------------------------------------------------------------
-
-[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
-. $ONOS_ROOT/tools/build/envDefaults
-
-cd $ONOS_ROOT && onos-buck build //:onos-test --show-output && \
-    rm -f $ONOS_TEST_TAR && \
-    ln -s $ONOS_ROOT/buck-out/gen/onos-test/onos-test-*.tar.gz $ONOS_TEST_TAR