4 # Parse optional arguments from gerrit comment trigger
5 for i in ${GERRIT_EVENT_COMMENT_TEXT}; do
8 hc_commit_id=`echo "${i}" | cut -d = -f2-`
11 vpp_commit_id=`echo "${i}" | cut -d = -f2-`
14 nsh_commit_id=`echo "${i}" | cut -d = -f2-`
21 # If HC variable is set, clone and build Honeycomb infra from the specified commit
22 # Otherwise skip this step, hc2vpp will use Honeycomb snapshots from Nexus
23 if [ -n "${hc_commit_id}" ]; then
24 git clone https://gerrit.fd.io/r/honeycomb
26 ref=`git ls-remote -q | grep ${hc_commit_id} | awk '{print $2}'`
27 git fetch origin ${ref} && git checkout FETCH_HEAD
28 mvn clean install -DskipTests -Dcheckstyle.skip -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
30 echo "Honeycomb infra build failed."
36 # TODO: Add option to build custom VPP and NSH packages
38 # Get CSIT branch from which to test from
39 if [ -f csit-test-branch ]; then
40 chmod +x csit-test-branch
41 CSIT_BRANCH=`./csit-test-branch`
47 git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
49 # If the git clone fails, complain clearly and exit
51 echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
57 # Download VPP packages
58 if [ ${STREAM} == 'master' ]; then
59 ./resources/tools/scripts/download_hc_build_pkgs.sh ${STREAM} ${OS}
61 ./resources/tools/scripts/download_hc_build_pkgs.sh 'stable.'${STREAM} ${OS}