Merge "Correction in script for building longbow docs"
[ci-management.git] / jjb / hc2vpp / include-raw-hc2vpp-csit-integration.sh
index 9bc42ad..e4bbd3f 100644 (file)
@@ -1,12 +1,20 @@
 #!/bin/bash
 set -xeu -o pipefail
 
-# Clone csit and start tests
-git clone https://gerrit.fd.io/r/csit --branch master
+# Get CSIT branch
+if [ -f csit-test-branch ]; then
+    chmod +x csit-test-branch
+    CSIT_BRANCH=`./csit-test-branch`
+else
+    CSIT_BRANCH='master'
+fi
+
+# Clone csit
+git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}
 
 # If the git clone fails, complain clearly and exit
 if [ $? != 0 ]; then
-    echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch master"
+    echo "Failed to run: git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH}"
     exit
 fi
 
@@ -20,7 +28,11 @@ else
     # make sure that bootstrap.sh is executable
     chmod +x bootstrap-hc2vpp-integration.sh
     # run the script
-    ./bootstrap-hc2vpp-integration.sh
+    if [ ${STREAM} == 'master' ]; then
+        ./bootstrap-hc2vpp-integration.sh ${STREAM} ${OS}
+    else
+        ./bootstrap-hc2vpp-integration.sh 'stable.'${STREAM} ${OS}
+    fi
 fi
 
 # vim: ts=4 ts=4 sts=4 et :