blob: 067cd78644d2477e754cad4c47008e6e72b621bf [file] [log] [blame]
Ray Milkey9eb58512018-08-15 10:52:12 -07001#!/bin/bash
2
3# exit on errors
4set -eu -o pipefail
5
6# 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
14# Install bazel
15curl -L -o bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel-0.15.2-installer-linux-x86_64.sh
16chmod +x bazel.sh
17./bazel.sh --user
18PATH=$PATH:/home/jenkins/bin
19
20# always free the cell when exiting
21function cleanup {
22 cell return jenkins-${ONOS_VERSION}
23}
24
25trap cleanup EXIT
26
27# grab a cell to run on
28cell borrow 30 3+1 jenkins-${ONOS_VERSION}
29
30# build onos bits
31bazel build onos
32
33# set up STC parameters
34topo default
35export stcDumpLogs="true"
36export stcColor="false"
37export stcHaltOnError="false"
38export TERM="vt100"
39
40# run STC
41stc setup && stc net-trellis-hag-smoke