X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=jjb%2Fvpp%2Finclude-raw-vpp-csit-functional.sh;h=a6f577b18154cab8ba71402cca0e309c8b736a06;hb=7a48620e96279ae99c2978bfd8e02bfc54e99d85;hp=38863fdace24b10b3f364a40ac45c3063dd8688d;hpb=948a1090912099956700582d73b7e54dc1a2178e;p=ci-management.git diff --git a/jjb/vpp/include-raw-vpp-csit-functional.sh b/jjb/vpp/include-raw-vpp-csit-functional.sh index 38863fdac..a6f577b18 100644 --- a/jjb/vpp/include-raw-vpp-csit-functional.sh +++ b/jjb/vpp/include-raw-vpp-csit-functional.sh @@ -27,45 +27,59 @@ if [ -e dpdk/vpp-dpdk-dkms*.deb ] then cp dpdk/vpp-dpdk-dkms*.deb csit/ else - cp /var/cache/apt/archives/vpp-dpdk-dkms*.deb csit/ + cp /w/dpdk/vpp-dpdk-dkms*.deb csit/ fi -cd csit - -if [ "$CSIT_BRANCH" == "latest" ]; then - # set required CSIT branch_id based on VPP master branch; by default use 'oper' - case "$VPP_BRANCH" in - master ) - BRANCH_ID="oper" - ;; - stable/1710 ) - BRANCH_ID="oper-rls1710" - ;; - stable/1801 ) - BRANCH_ID="oper-rls1801" - ;; - * ) - BRANCH_ID="oper" - esac +# Check for CSIT_REF test file +if [ -e CSIT_REF ]; then + source CSIT_REF +fi - # get the latest verified version of the required branch - CSIT_BRANCH=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1)) +# If also testing a specific csit refpoint look for CSIT_REF +if [[ -v CSIT_REF ]]; then + (cd csit ; git fetch ssh://rotterdam-jobbuilder@gerrit.fd.io:29418/csit $CSIT_REF && git checkout FETCH_HEAD) +else + cd csit + if [ "$CSIT_BRANCH" == "latest" ]; then + # set required CSIT branch_id based on VPP master branch; by default use 'oper' + case "$VPP_BRANCH" in + master ) + BRANCH_ID="oper" + ;; + stable/1710 ) + BRANCH_ID="oper-rls1710" + ;; + stable/1801 ) + BRANCH_ID="oper-rls1801" + ;; + stable/1804 ) + BRANCH_ID="oper-rls1804" + ;; + stable/1807 ) + BRANCH_ID="oper-rls1807" + ;; + * ) + BRANCH_ID="oper" + esac - if [ "${CSIT_BRANCH}" == "" ]; then - echo "No verified CSIT branch found - exiting" - exit 1 - fi + # get the latest verified version of the required branch + CSIT_BRANCH=$(echo $(git branch -r | grep -E "${BRANCH_ID}-[0-9]+" | tail -n 1)) - # remove 'origin/' from the branch name - CSIT_BRANCH=$(echo ${CSIT_BRANCH#origin/}) -fi + if [ "${CSIT_BRANCH}" == "" ]; then + echo "No verified CSIT branch found - exiting" + exit 1 + fi -# checkout the required csit branch -git checkout ${CSIT_BRANCH} + # remove 'origin/' from the branch name + CSIT_BRANCH=$(echo ${CSIT_BRANCH#origin/}) + fi + # checkout the required csit branch + git checkout ${CSIT_BRANCH} -if [ $? != 0 ]; then - echo "Failed to checkout the required CSIT branch: ${CSIT_BRANCH}" - exit 1 + if [ $? != 0 ]; then + echo "Failed to checkout the required CSIT branch: ${CSIT_BRANCH}" + exit 1 + fi fi # execute csit bootstrap script if it exists