Merge "Correction in script for building longbow docs"
authorVanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
Tue, 20 Feb 2018 16:30:59 +0000 (16:30 +0000)
committerGerrit Code Review <gerrit@fd.io>
Tue, 20 Feb 2018 16:30:59 +0000 (16:30 +0000)
.gitmodules [new file with mode: 0644]
jjb/deb_dpdk/deb_dpdk.yaml
jjb/global-jjb [new submodule]
jjb/scripts/setup_vpp_ubuntu_docker_test.sh
jjb/vpp/include-raw-vpp-build.sh
jjb/vpp/include-raw-vpp-csit-functional.sh
jjb/vpp/include-raw-vpp-csit-verify-perf.sh
jjb/vpp/vpp.yaml

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..07b28be
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "jjb/global-jjb"]
+       path = jjb/global-jjb
+       url = https://github.com/lfit/releng-global-jjb
index d0aa38e..6b3db8a 100644 (file)
@@ -25,6 +25,9 @@
         - 1711:
             branch: '17.11.x'
             repo-stream-part: 'deb_dpdk_1711'
+        - 1802:
+            branch: '18.02.x'
+            repo-stream-part: 'deb_dpdk_1802'
 
 - job-template:
     name: 'deb_dpdk-verify-{stream}-{os}'
diff --git a/jjb/global-jjb b/jjb/global-jjb
new file mode 160000 (submodule)
index 0000000..8e33e6a
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 8e33e6ab798cd57a383cb8871d973de3fce6340c
index 41c8dd6..1828174 100644 (file)
@@ -9,6 +9,25 @@
 ##############################################################################
 set -e -o pipefail
 
+OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
+
 if ! [ -z ${DOCKER_TEST} ] ; then
                mount -o remount /dev/shm -o size=512M || true
+        echo "/dev/shm remounted"
+fi
+
+if [ "${OS_ID}" == "ubuntu" ]; then
+    dpkg-query -W -f='${binary:Package}\t${Version}\n'
+    pip list
+elif [ "${OS_ID}" == "centos" ]; then
+    yum list installed
+    pip list
+elif [ "${OS_ID}" == "opensuse" ]; then
+    yum list installed
+    pip list
 fi
+if [ "x${IS_CSIT_VPP_JOB}" == "xTrue" ]; then
+       (cd dpdk ; apt-get download vpp-dpdk-dkms > /dev/null 2>&1) || true
+    ls -l dpdk/*.deb || true
+    echo "csit vpp-dpdk-dkms package download"
+fi
\ No newline at end of file
index 28d6919..6a13995 100644 (file)
@@ -47,7 +47,7 @@ then
     [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes verify
 else
     echo "Building using \"make build-root/vagrant/build.sh\""
-    [ "x${DRYRUN}" == "xTrue" ] || make install-dep
+    [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes install-dep
     [ "x${DRYRUN}" == "xTrue" ] || make UNATTENDED=yes dpdk-install-dev
     [ "x${DRYRUN}" == "xTrue" ] || build-root/vagrant/build.sh
 fi
index 38ef7e0..38863fd 100644 (file)
@@ -7,14 +7,19 @@ if [ -x build-root/scripts/csit-test-branch ]; then
     CSIT_BRANCH=`build-root/scripts/csit-test-branch`;
 fi
 
-# Clone csit and start tests
-git clone https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}
+# check CSIT_BRANCH value
+if [ "$CSIT_BRANCH" == "" ]; then
+    echo "CSIT_BRANCH not provided => 'latest' will be used"
+    CSIT_BRANCH="latest"
+fi
+
+# clone csit
+git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit
 
-# If the git clone fails, complain clearly and exit
+# 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 ${CSIT_BRANCH:-csit-verified}"
-    echo "No such branch ${CSIT_BRANCH:-csit-verified} in https://gerrit.fd.io/r/csit"
-    exit
+    echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit"
+    exit 1
 fi
 
 cp build-root/*.deb csit/
@@ -26,6 +31,43 @@ else
 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
+
+    # 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 [ "${CSIT_BRANCH}" == "" ]; then
+        echo "No verified CSIT branch found - exiting"
+        exit 1
+    fi
+
+    # 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
+fi
+
 # execute csit bootstrap script if it exists
 if [ -e bootstrap.sh ]
 then
index aa59792..e2e88d8 100644 (file)
@@ -12,14 +12,19 @@ if [ -x build-root/scripts/csit-test-branch ]; then
     CSIT_BRANCH=`build-root/scripts/csit-test-branch`;
 fi
 
-# Clone csit and start tests
-git clone --depth 1 https://gerrit.fd.io/r/csit --branch ${CSIT_BRANCH:-csit-verified}
+# check CSIT_BRANCH value
+if [ "$CSIT_BRANCH" == "" ]; then
+    echo "CSIT_BRANCH not provided => 'latest' will be used"
+    CSIT_BRANCH="latest"
+fi
+
+# clone csit
+git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit
 
-# If the git clone fails, complain clearly and exit
+# 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 ${CSIT_BRANCH:-csit-verified}"
-    echo "No such branch ${CSIT_BRANCH:-csit-verified} in https://gerrit.fd.io/r/csit"
-    exit
+    echo "Failed to run: git clone --depth 1 --no-single-branch https://gerrit.fd.io/r/csit"
+    exit 1
 fi
 
 cp build-root/*.deb csit/
@@ -31,6 +36,43 @@ else
 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
+
+    # 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 [ "${CSIT_BRANCH}" == "" ]; then
+        echo "No verified CSIT branch found - exiting"
+        exit 1
+    fi
+
+    # 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
+fi
+
 # execute csit bootstrap script if it exists
 if [ ! -e bootstrap-verify-perf.sh ]
 then
index 64fbc4a..b8b45fc 100644 (file)
             branch: '{branch}'
 
     builders:
+        - shell: 'echo "VPP_BRANCH={branch}" > $WORKSPACE/variables.prop'
+        - inject:
+            properties-file: variables.prop
         - shell:
             !include-raw-escape:
                 - include-raw-vpp-checkstyle.sh
         - shell:
             !include-raw-escape:
+                - ../scripts/setup_vpp_ubuntu_docker_test.sh
                 - ../scripts/setup_vpp_dpdk_dev_env.sh
                 - include-raw-vpp-build.sh
         - shell:
                 notbuilt: false
 
     builders:
+        - shell: 'echo "VPP_BRANCH={branch}" > $WORKSPACE/variables.prop'
+        - inject:
+            properties-file: variables.prop
         - shell:
             !include-raw-escape:
                 - ../scripts/setup_vpp_dpdk_dev_env.sh