Merge "Add INFO.yaml verify job"
[ci-management.git] / jjb / hc2vpp / include-raw-hc2vpp-csit-integration.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 1
19 fi
20
21 cd csit
22 # execute csit bootstrap script if it exists
23 if [[ ! -e bootstrap-hc2vpp-integration.sh ]]
24 then
25     echo 'ERROR: No bootstrap-hc2vpp-integration.sh found'
26     exit 1
27 else
28     # make sure that bootstrap.sh is executable
29     chmod +x bootstrap-hc2vpp-integration.sh
30     # run the script
31     ./bootstrap-hc2vpp-integration.sh ${STREAM} ${OS}
32 fi
33
34 # vim: ts=4 ts=4 sts=4 et :