Ray Milkey | 9eb5851 | 2018-08-15 10:52:12 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Ray Milkey | f8198ed | 2019-03-08 23:53:24 +0000 | [diff] [blame] | 3 | # exit on errors |
| 4 | set -eu -o pipefail |
| 5 | |
| 6 | # initialize build environment |
| 7 | ONOS_ROOT=`pwd` |
| 8 | . tools/build/envDefaults |
| 9 | |
| 10 | # initialize development environment for STC |
| 11 | export JAVA_HOME= |
| 12 | . tools/dev/bash_profile |
| 13 | |
| 14 | PATH=$PATH:/home/jenkins/bin |
| 15 | |
| 16 | # always free the cell when exiting |
| 17 | function cleanup { |
Ray Milkey | b8ec73b | 2019-03-08 16:43:42 -0800 | [diff] [blame] | 18 | cell return ${BUILD_TAG} |
Ray Milkey | f8198ed | 2019-03-08 23:53:24 +0000 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | trap cleanup EXIT |
| 22 | |
| 23 | # grab a cell to run on |
Ray Milkey | b8ec73b | 2019-03-08 16:43:42 -0800 | [diff] [blame] | 24 | cell borrow 60 3+1 ${BUILD_TAG} |
Ray Milkey | f8198ed | 2019-03-08 23:53:24 +0000 | [diff] [blame] | 25 | |
| 26 | # build onos bits |
| 27 | bazel build onos |
| 28 | |
| 29 | # set up STC parameters |
| 30 | topo default |
| 31 | export stcDumpLogs="true" |
| 32 | export stcColor="false" |
| 33 | export stcHaltOnError="false" |
| 34 | export TERM="vt100" |
| 35 | |
Ray Milkey | 9eb5851 | 2018-08-15 10:52:12 -0700 | [diff] [blame] | 36 | # run STC |
| 37 | stc setup && stc net-trellis-hag-smoke |