blob: 30125ef2ca53d45adcc809ae292ee26c3a312dc5 [file] [log] [blame]
#!/bin/bash
# exit on errors
set -eu -o pipefail
# initialize build environment
ONOS_ROOT=`pwd`
. tools/build/envDefaults
# initialize development environment for STC
export JAVA_HOME=
. tools/dev/bash_profile
if [ ${GERRIT_BRANCH} == "onos-1.14" ]
then
curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel-0.15.2-installer-linux-x86_64.sh
fi
if [ ${GERRIT_BRANCH} == "onos-1.15" ]
then
curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.17.1/bazel-0.17.1-installer-linux-x86_64.sh
fi
if [ ${GERRIT_BRANCH} == "master" ]
then
curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.19.0/bazel-0.19.0-installer-linux-x86_64.sh
fi
# always free the cell when exiting
function cleanup {
cell return jenkins-${ONOS_VERSION}
}
trap cleanup EXIT
# grab a cell to run on
cell borrow 30 3+1 jenkins-${ONOS_VERSION}
# build onos bits
onos-buck build onos
# set up STC parameters
topo default
export stcDumpLogs="true"
export stcColor="false"
export stcHaltOnError="false"
export TERM="vt100"
# run STC
stc