blob: 23f8d50ad7f13826490b111905c664de37629c69 [file] [log] [blame]
Ray Milkey3aa8af52018-03-09 09:10:08 -08001#!/bin/bash
2
Ray Milkeyf45a5072018-05-10 16:04:27 +00003# exit on errors
4set -eu -o pipefail
5
Ray Milkey3aa8af52018-03-09 09:10:08 -08006# initialize build environment
7ONOS_ROOT=`pwd`
8. tools/build/envDefaults
9
10# initialize development environment for STC
Ray Milkey8c67f302018-03-09 14:23:49 -080011export JAVA_HOME=
Ray Milkey3aa8af52018-03-09 09:10:08 -080012. tools/dev/bash_profile
13
Ray Milkeybad5c112018-11-09 14:24:07 -080014PATH=$PATH:/home/jenkins/bin
Ray Milkey3aa8af52018-03-09 09:10:08 -080015
16# always free the cell when exiting
17function cleanup {
Ray Milkey9ac211e2018-04-16 13:03:37 -070018 cell return jenkins-${ONOS_VERSION}
Ray Milkey3aa8af52018-03-09 09:10:08 -080019}
20
21trap cleanup EXIT
22
23# grab a cell to run on
Ray Milkeyf45a5072018-05-10 16:04:27 +000024cell borrow 30 3+1 jenkins-${ONOS_VERSION}
Ray Milkey3aa8af52018-03-09 09:10:08 -080025
26# build onos bits
27onos-buck build onos
28
29# set up STC parameters
30topo default
Ray Milkey6d4b1852018-04-06 08:43:48 -070031export stcDumpLogs="true"
Ray Milkey3aa8af52018-03-09 09:10:08 -080032export stcColor="false"
Ray Milkey6d4b1852018-04-06 08:43:48 -070033export stcHaltOnError="false"
34export TERM="vt100"
Ray Milkey3aa8af52018-03-09 09:10:08 -080035
36# run STC
37stc