Csit-Honeycomb job for 17.01 76/4876/6
authorselias <samelias@cisco.com>
Wed, 25 Jan 2017 16:15:01 +0000 (17:15 +0100)
committerselias <samelias@cisco.com>
Tue, 31 Jan 2017 08:59:45 +0000 (09:59 +0100)
 - relates to https://gerrit.fd.io/r/4933

Change-Id: I78e0a28d529b3308d0acd6a11a45ff49b24a8919
Signed-off-by: selias <samelias@cisco.com>
jjb/global-macros.yaml
jjb/hc2vpp/csit-hc2vpp.yaml
jjb/hc2vpp/include-raw-hc2vpp-csit-integration.sh
jjb/hc2vpp/include-raw-hc2vpp-csit-verify-prebuild.sh

index f3171a9..2493c2b 100644 (file)
             default: '{is-csit-vpp-job}'
             description: "Parameter is True if this is a CSIT vpp job."
 
+- parameter:
+    name: stream-parameter
+    parameters:
+        - string:
+            name: STREAM
+            default: '{stream}'
+            description: "Stream job parameter to be used in shell scripts."
+
 
 ##### SCMS
 - scm:
index 94e4699..f4ad748 100644 (file)
@@ -5,13 +5,14 @@
         - 'hc2vpp-csit-integration-{stream}-{os}'
         - 'hc2vpp-csit-verify-{stream}-{os}'
     project: 'hc2vpp'
-    branch: 'master'
-    branch-id: 'master'
     build-artifact-num-to-keep: 10
     stream:
         - master:
             branch: 'master'
             repo-stream-part: 'master'
+        - '1701':
+            branch: 'stable/1701'
+            repo-stream-part: 'stable.1701'
     os:
         - ubuntu1404:
             repo-os-part: 'ubuntu.trusty.main'
@@ -21,7 +22,7 @@
     name: 'hc2vpp-csit-integration-{stream}-{os}'
 
     project-type: freestyle
-    node: 'ubuntu1604-basebuild-4c-4g'
+    node: 'ubuntu1404-basebuild-4c-4g'
     concurrent: true
 
     logrotate:
@@ -35,6 +36,8 @@
             project: '{project}'
         - os-parameter:
             os: '{os}'
+        - stream-parameter:
+            stream: '{stream}'
 
     scm:
         - git-scm:
@@ -47,7 +50,7 @@
 
     triggers:
         - reverse:
-            jobs: 'hc2vpp-verify-{stream}-{os}'
+            jobs: 'hc2vpp-integration-{stream}-{os}'
             result: 'success'
 
     prebuilders:
@@ -76,7 +79,7 @@
     name: 'hc2vpp-csit-verify-{stream}-{os}'
 
     project-type: maven
-    node: 'ubuntu1604-basebuild-4c-4g'
+    node: 'ubuntu1404-basebuild-4c-4g'
     concurrent: true
 
     logrotate:
@@ -96,6 +99,8 @@
             maven: 'mvn33-new'
         - maven-exec:
             maven-version: 'mvn33-new'
+        - stream-parameter:
+            stream: '{stream}'
 
     scm:
         - gerrit-trigger-scm:
index 9bc42ad..6155a46 100644 (file)
@@ -2,7 +2,10 @@
 set -xeu -o pipefail
 
 # Clone csit and start tests
-git clone https://gerrit.fd.io/r/csit --branch master
+if [ ${STREAM} == 'master' ]; then
+    git clone https://gerrit.fd.io/r/csit --branch master
+else
+        git clone https://gerrit.fd.io/r/csit --branch 'rls'${STREAM}
 
 # If the git clone fails, complain clearly and exit
 if [ $? != 0 ]; then
@@ -20,7 +23,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}
+    else
+        ./bootstrap-hc2vpp-integration.sh 'stable.'${STREAM}
+    fi
 fi
 
 # vim: ts=4 ts=4 sts=4 et :
index 62b495e..6e484f9 100644 (file)
@@ -1,18 +1,28 @@
 #!/bin/bash
 set -xeu -o pipefail
 
-current_dir = `pwd`
+current_dir=`pwd`
 cd ${WORKSPACE}
 
-# Clone csit and run package download script
-git clone https://gerrit.fd.io/r/csit --branch master
+# Get CSIT branch from which to test from
+# running build-root/scripts/csit-test-branch
+if [ -x csit-test-branch ]; then
+    CSIT_BRANCH=`csit-test-branch`;
+fi
+
+# Clone csit and start tests
+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
 
-./csit/resources/tools/download_hc_build_pkgs.sh
+if [ ${STREAM} == 'master' ]; then
+    ./csit/resources/tools/download_hc_build_pkgs.sh ${STREAM}
+else
+    ./csit/resources/tools/download_hc_build_pkgs.sh 'stable.'${STREAM}
+fi
 
 cd ${current_dir}