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-`
17 csit_commit_id=`echo "${i}" | cut -d = -f2-`
24 # If HC variable is set, clone and build Honeycomb infra from the specified commit
25 # Otherwise skip this step, hc2vpp will use Honeycomb snapshots from Nexus
26 if [ -n "${hc_commit_id}" ]; then
27 git clone https://gerrit.fd.io/r/honeycomb
29 ref=`git ls-remote -q | grep ${hc_commit_id} | awk '{print $2}'`
30 git fetch origin ${ref} && git checkout FETCH_HEAD
31 mvn clean install -DskipTests -Dcheckstyle.skip -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -gs "${GLOBAL_SETTINGS_FILE}" -s "${SETTINGS_FILE}"
33 echo "Honeycomb infra build failed."
37 # Clean up when done. Leftover build files interfere with building hc2vpp.
41 # TODO: Add option to build custom VPP and NSH packages
43 # Get CSIT branch from which to test from
44 if [ -f csit-test-branch ]; then
45 chmod +x csit-test-branch
46 CSIT_BRANCH=`./csit-test-branch`
52 git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
54 # If the git clone fails, complain clearly and exit
56 echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
62 # If CSIT commit ID is given, checkout the specified commit
63 if [ -n "${csit_commit_id}" ]; then
66 # e8f326efebb58e28dacb9ebb653baf95aad1448c refs/changes/08/11808/1
68 ref=`git ls-remote -q | grep ${csit_commit_id} | awk '{print $2}'`
69 git fetch origin ${ref} && git checkout FETCH_HEAD
72 # Download VPP packages
73 if [ ${STREAM} == 'master' ]; then
74 ./resources/tools/scripts/download_hc_build_pkgs.sh ${STREAM} ${OS}
76 ./resources/tools/scripts/download_hc_build_pkgs.sh 'stable.'${STREAM} ${OS}