77992b450057b52766ec424429571dc059ddf564
[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 else
13     CSIT_BRANCH='master'
14 fi
15
16 # Clone csit and download VPP packages
17 git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
18
19 # If the git clone fails, complain clearly and exit
20 if [ $? != 0 ]; then
21     echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
22     exit
23 fi
24
25 cd csit
26
27 if [ ${STREAM} == 'master' ]; then
28     ./resources/tools/download_hc_build_pkgs.sh ${STREAM} ${OS}
29 else
30     ./resources/tools/download_hc_build_pkgs.sh 'stable.'${STREAM} ${OS}
31 fi
32
33 cd ${current_dir}