blob: 92a88560348a4e96d1f5f0b46d5d831a87ff969d [file] [log] [blame]
Ray Milkeycfbc5be2018-05-08 09:13:13 -07001#!/bin/bash
2
Ray Milkeyf7c53762018-05-10 16:12:15 +00003# exit on errors
4set -eu -o pipefail
5
Ray Milkeycfbc5be2018-05-08 09:13:13 -07006# initialize build environment
7ONOS_ROOT=`pwd`
8. tools/build/envDefaults
9
10# initialize development environment for STC
11export JAVA_HOME=
12. tools/dev/bash_profile
13
Ray Milkey7d89b3e2018-11-09 10:39:01 -080014if [ ${GERRIT_BRANCH} == "onos-1.14" ]
15then
16 curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel-0.15.2-installer-linux-x86_64.sh
17fi
18if [ ${GERRIT_BRANCH} == "onos-1.15" ]
19then
20 curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.17.1/bazel-0.17.1-installer-linux-x86_64.sh
21fi
22if [ ${GERRIT_BRANCH} == "master" ]
23then
24 curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.19.0/bazel-0.19.0-installer-linux-x86_64.sh
25fi
26
Ray Milkeycfbc5be2018-05-08 09:13:13 -070027
28# always free the cell when exiting
29function cleanup {
30 cell return jenkins-${ONOS_VERSION}
31}
32
33trap cleanup EXIT
34
35# grab a cell to run on
Ray Milkeyf7c53762018-05-10 16:12:15 +000036cell borrow 30 3+1 jenkins-${ONOS_VERSION}
Ray Milkeycfbc5be2018-05-08 09:13:13 -070037
38# build onos bits
39onos-buck build onos
40
41# set up STC parameters
42topo default
43export stcDumpLogs="true"
44export stcColor="false"
45export stcHaltOnError="false"
46export TERM="vt100"
47
48# run STC
49stc setup && stc net-trellis-hag-smoke