Build OVS 2.6 with DPDK 16.11
[ovsnfv.git] / ci / buildovs.sh
index db3ac9b..eefd380 100755 (executable)
@@ -1,12 +1,19 @@
 #!/bin/bash
-##############################################################################
-# Copyright (c) 2015,2016 Red Hat Inc. and others.
-# therbert@redhat.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
+
+# Copyright (c) 2016 Open Platform for NFV Project, Inc. and its contributors
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+
 set -e
 
 echo "==================================="
@@ -49,13 +56,9 @@ export TOPDIR=$BUILD_BASE
 
 export TMP_RELEASE_DIR=$TOPDIR/release
 export CACHE_DIR=$TOPDIR/cache
-export TMPDIR=$TOPDIR/scratch
+export TEMPDIR=$TOPDIR/scratch
 export RPMDIR=$TOPDIR/rpmbuild
 
-echo "--------------------------------------------------"
-echo "Build OVS RPM from upstream git $TAG"
-echo
-
 mkdir -p $RPMDIR/RPMS
 mkdir -p $RPMDIR/SOURCES
 mkdir -p $RPMDIR/SPECS
@@ -66,16 +69,13 @@ then
     mkdir -p $TMP_RELEASE_DIR
 fi
 
-#
-# Build ovs rpm without DPDK from ovs master
-#
-echo =======Build ovs rpm and ovs kmod rpm without DPDK Test in VM==========
-    BuildAndTestOVS.sh -p none -t
 #
 # Build ovs rpm with DPDK
 #
-echo =======Build ovs rpm with DPDK Test in VM==========
-BuildAndTestOVS.sh -d -p none -t
+echo =============================================
+echo =======Build ovs rpm with DPDK and test in VM.
+echo
+$BUILD_BASE/BuildAndTestOVS.sh -d -g master -p none -t
 #
 # Build special version of ovs with patches --TODO
 #
@@ -87,18 +87,18 @@ BuildAndTestOVS.sh -d -p none -t
 echo "---------------------------------------"
 echo "Cleanup temporary dirs"
 echo
-cd $BUILDDIR
+cd $BUILD_BASE
 
-if [ -d $TMPDIR ]
+if [ -d $TEMPDIR ]
 then
-    echo rm -rf $TMPDIR
-    rm -rf $TMPDIR
+    echo rm -rf $TEMPDIR
+    rm -rf $TEMPDIR
 fi
 
 # copy artifacts.
 
 if [[ "$JOB_NAME" =~ "daily" ]]; then
-    upload_artifacts.sh
+    $BUILD_BASE/../ci/upload_artifacts.sh
 fi
 
 if [ -d $TMP_RELEASE_DIR ]; then
@@ -112,6 +112,6 @@ fi
 # Destroy VM if one has been deployed. Also remove any local installation of
 # DPDK and OVS
 #
-clean.sh
+sudo $BUILD_BASE/../ci/clean.sh
 
 exit 0