summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Kern <ejk@cisco.com>2018-02-16 06:55:03 -0700
committerJan Gelety <jgelety@cisco.com>2018-02-20 16:29:40 +0000
commit4ffe1717fe734c5cb6d2c4eabc3a990a59d5b26e (patch)
tree705ec2c7ef5d86da9f0702542ca9df72a232f8df
parenta193af9312e313e3268f9847d194431f00c1aca7 (diff)
VPP: csit ref pointer for dual commit testing
Change-Id: Ib9ac1042f463689d8910bb9bb78cea82f1ba7da3 Signed-off-by: Ed Kern <ejk@cisco.com>
-rw-r--r--jjb/vpp/include-raw-vpp-csit-functional.sh70
-rw-r--r--jjb/vpp/vpp.yaml3
2 files changed, 42 insertions, 31 deletions
diff --git a/jjb/vpp/include-raw-vpp-csit-functional.sh b/jjb/vpp/include-raw-vpp-csit-functional.sh
index 38863fdac..988b14a0a 100644
--- a/jjb/vpp/include-raw-vpp-csit-functional.sh
+++ b/jjb/vpp/include-raw-vpp-csit-functional.sh
@@ -30,42 +30,50 @@ else
cp /var/cache/apt/archives/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"
+ ;;
+ * )
+ 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
diff --git a/jjb/vpp/vpp.yaml b/jjb/vpp/vpp.yaml
index b8b45fc98..3aa58b923 100644
--- a/jjb/vpp/vpp.yaml
+++ b/jjb/vpp/vpp.yaml
@@ -221,6 +221,9 @@
repo-name: '{repo-stream-part}.ubuntu.xenial.main'
- is-csit-vpp-job-parameter:
is-csit-vpp-job: 'True'
+ - string:
+ name: CSIT_REF
+ description: "Also testing CSIT_REF"
scm:
- gerrit-trigger-scm: