Add hc2vpp-csit jobs on Ubuntu16.04
[ci-management.git] / jjb / hc2vpp / include-raw-hc2vpp-csit-verify-prebuild.sh
1 #!/bin/bash
2 set -xeu -o pipefail
3
4 current_dir=`pwd`
5 cd ${WORKSPACE}
6
7 # Get CSIT branch from which to test from
8 # running build-root/scripts/csit-test-branch
9 if [ -f csit-test-branch ]; then
10     chmod +x csit-test-branch
11     CSIT_BRANCH=`./csit-test-branch`
12 fi
13
14 # Clone csit and download VPP packages
15 git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
16
17 # If the git clone fails, complain clearly and exit
18 if [ $? != 0 ]; then
19     echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
20     exit
21 fi
22
23 cd csit
24
25 if [ ${STREAM} == 'master' ]; then
26     ./csit/resources/tools/download_hc_build_pkgs.sh ${STREAM} ${OS}
27 else
28     ./csit/resources/tools/download_hc_build_pkgs.sh 'stable.'${STREAM} ${OS}
29 fi
30
31 cd ${current_dir}