Add CSIT verify jobs for Honeycomb tests
[ci-management.git] / jjb / hc2vpp / include-raw-hc2vpp-csit-perf.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 # Get CSIT branch
5 if [ -f csit-test-branch ]; then
6     chmod +x csit-test-branch
7     CSIT_BRANCH=`./csit-test-branch`
8 else
9     CSIT_BRANCH='master'
10 fi
11
12 # Clone csit
13 git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
14
15 # If the git clone fails, complain clearly and exit
16 if [ $? != 0 ]; then
17     echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
18     exit
19 fi
20
21 cd csit
22 # execute csit bootstrap script if it exists
23 if [ ! -e bootstrap-hc2vpp-perf.sh ]
24 then
25     echo 'ERROR: No bootstrap-hc2vpp-perf.sh found'
26     exit 1
27 else
28     # make sure that bootstrap.sh is executable
29     chmod +x bootstrap-hc2vpp-perf.sh
30     # run the script
31     if [ ${STREAM} == 'master' ]; then
32         ./bootstrap-hc2vpp-perf.sh ${STREAM} ${OS} ${ODL}
33     else
34         ./bootstrap-hc2vpp-perf.sh 'stable.'${STREAM} ${OS} ${ODL}
35     fi
36 fi
37
38 # vim: ts=4 ts=4 sts=4 et :