Merge "[compass] add new job of onos-sfc senario"
authormeimei <meimei@huawei.com>
Tue, 19 Jul 2016 01:20:24 +0000 (01:20 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 19 Jul 2016 01:20:24 +0000 (01:20 +0000)
jjb/fuel/fuel-ci-jobs.yml
jjb/fuel/fuel-deploy.sh
jjb/opnfv/opnfv-lint.yml
jjb/yardstick/yardstick-ci-jobs.yml
jjb/yardstick/yardstick-daily.sh
utils/gpg_import_key.sh

index eeeb9e4..e328345 100644 (file)
 - trigger:
     name: 'fuel-os-odl_l2-nofeature-ha-zte-pod1-daily-master-trigger'
     triggers:
-        - timed: '15 9 * * *'
+        - timed: '0 10 * * *'
 - trigger:
     name: 'fuel-os-odl_l3-nofeature-ha-zte-pod1-daily-master-trigger'
     triggers:
index 14d48e7..b0f369d 100755 (executable)
@@ -7,7 +7,6 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
-set -o errexit
 set -o nounset
 set -o pipefail
 
@@ -57,10 +56,16 @@ chmod a+x $TMPDIR
 # clone the securedlab repo
 cd $WORKSPACE
 echo "Cloning securedlab repo ${GIT_BRANCH##origin/}"
-git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab --quiet --branch ${GIT_BRANCH##origin/}
+git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab --quiet \
+    --branch ${GIT_BRANCH##origin/}
+
+# log file name
+FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz"
 
 # construct the command
-DEPLOY_COMMAND="sudo $WORKSPACE/ci/deploy.sh -b file://$WORKSPACE/securedlab -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://$WORKSPACE/opnfv.iso -H -B $BRIDGE -S $TMPDIR"
+DEPLOY_COMMAND="sudo $WORKSPACE/ci/deploy.sh -b file://$WORKSPACE/securedlab \
+    -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i file://$WORKSPACE/opnfv.iso \
+    -H -B $BRIDGE -S $TMPDIR -log $WORKSPACE/$FUEL_LOG_FILENAME"
 
 # log info to console
 echo "Deployment parameters"
@@ -80,10 +85,26 @@ echo "$DEPLOY_COMMAND"
 echo
 
 $DEPLOY_COMMAND
+exit_code=$?
 
 echo
 echo "--------------------------------------------------------"
-echo "Deployment is done successfully!"
+echo "Deployment is done!"
+
+# upload logs for baremetal deployments
+# work with virtual deployments is still going on so we skip that for the timebeing
+if [[ "$JOB_NAME" =~ "baremetal-daily" ]]; then
+    echo "Uploading deployment logs"
+    gsutil cp $WORKSPACE/$FUEL_LOG_FILENAME gs://$GS_URL/logs/$FUEL_LOG_FILENAME > /dev/null 2>&1
+    echo "Logs are available as http://$GS_URL/logs/$FUEL_LOG_FILENAME"
+fi
+
+if [[ $exit_code -ne 0 ]]; then
+    echo "Deployment failed!"
+    exit $exit_code
+else
+    echo "Deployment is successful!"
+fi
 
 # Quick and dirty fix for SFC scenatio - will be fixed properly post-release
 if [[ ! "$DEPLOY_SCENARIO" =~ "os-odl_l2-sfc" ]]; then
index aeea34e..4f3f7ac 100644 (file)
@@ -51,7 +51,7 @@
                     comment-contains-value: 'reverify'
             projects:
               - project-compare-type: 'REG_EXP'
-                project-pattern: 'functest'
+                project-pattern: 'functest|sdnvpn'
                 branches:
                   - branch-compare-type: 'ANT'
                     branch-pattern: '**/{branch}'
index 21a6b80..6b92288 100644 (file)
             default: '{docker-tag}'
             description: 'Tag to pull docker image'
         - string:
-            name: YARDSTICK_SUITE_NAME
-            default: opnfv_${{NODE_NAME}}_{testsuite}.yaml
-            description: 'Path to test suite'
+            name: YARDSTICK_SCENARIO_SUITE_NAME
+            default: opnfv_${{DEPLOY_SCENARIO}}_{testsuite}.yaml
+            description: 'Path to test scenario suite'
         - string:
             name: CI_DEBUG
             default: 'false'
index 176f1b9..e8df9be 100755 (executable)
@@ -33,7 +33,7 @@ docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
 
 # Run docker
 cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick \
-    exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SUITE_NAME}"
+    exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}"
 echo "Yardstick: Running docker cmd: ${cmd}"
 ${cmd}
 
index 80b7c39..bb11f0d 100755 (executable)
@@ -7,15 +7,32 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
-
 function isinstalled {
-if rpm -q "$@" >/dev/null 2>&1; then
-  true
-    else
-      echo installing "$1"
-      sudo yum install "$1"
-  false
+
+source /etc/os-release; echo ${ID/*, /}
+
+if [[ ${ID/*, /} =~ "centos" ]]; then
+  if rpm -q "$@" >/dev/null 2>&1; then
+    true
+      else
+        echo installing "$1"
+        sudo yum install "$1"
+    false
+  fi
+
+elif [[ ${ID/*, /} =~ "ubuntu" ]]; then
+  if dpkg-query -W -f'${Status}' "$@" 2>/dev/null | grep -q "ok installed"; then
+    true
+      else
+        echo installing "$1"
+        sudo apt-get install -y "$1"
+    false
+  fi
+else
+  echo "Distro not supported"
+  exit 0
 fi
+
 }
 
 if ! isinstalled gnupg2; then