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