4 # check BRANCH_ID value
5 if [ "$BRANCH_ID" == "" ]; then
6 echo "branch_id not provided => 'master' will be used"
11 git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit
13 # if the git clone fails, complain clearly and exit
15 echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit"
21 # get the latest verified version of the required branch
22 BRANCH_NAME=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1))
24 if [ "${BRANCH_NAME}" == "" ]; then
25 echo "No verified version found for requested branch - exiting"
29 # remove 'origin/' from the branch name
30 BRANCH_NAME=$(echo ${BRANCH_NAME#origin/})
32 # checkout to the required branch
33 git checkout ${BRANCH_NAME}
35 # execute csit bootstrap script if it exists
36 if [ -e bootstrap-vpp-verify-semiweekly.sh ]
38 # make sure that bootstrap.sh is executable
39 chmod +x bootstrap-vpp-verify-semiweekly.sh
41 ./bootstrap-vpp-verify-semiweekly.sh
43 echo 'ERROR: No bootstrap-vpp-verify-semiweekly.sh found'
47 # vim: ts=4 ts=4 sts=4 et :