aboutsummaryrefslogtreecommitdiffstats
path: root/fuel-plugin-vsperf/pre_build_hook
diff options
context:
space:
mode:
authorBilly O'Mahony <billy.o.mahony@intel.com>2016-01-19 12:05:46 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-01-25 09:54:51 +0000
commit44bc6ec61edaca48d5c6a9d8a894c6afa6919ed8 (patch)
tree4ef7c71e77a957c3f2e3925a624b037b79578bda /fuel-plugin-vsperf/pre_build_hook
parentc9413319f67ef305bf19d57ebcf45530215d2ac7 (diff)
fuel-plugin: Initial version targeting Fuel8
Change-Id: I21b24527da480c713899bffdaec8381752354e53 Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> (cherry picked from commit 2a3ff071bd08ff02610286a5ad4ba46690b6bc6b)
Diffstat (limited to 'fuel-plugin-vsperf/pre_build_hook')
-rwxr-xr-xfuel-plugin-vsperf/pre_build_hook36
1 files changed, 36 insertions, 0 deletions
diff --git a/fuel-plugin-vsperf/pre_build_hook b/fuel-plugin-vsperf/pre_build_hook
new file mode 100755
index 00000000..12517bcc
--- /dev/null
+++ b/fuel-plugin-vsperf/pre_build_hook
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Add here any the actions which are required before plugin build
+# like packages building, packages downloading from mirrors and so on.
+# The script should return 0 if there were no errors.
+#!/bin/bash
+
+set -eux
+
+VSPERF_REV=${VSPERF_REV:-stable/brahmaputra}
+BUILD_FOR=${BUILD_FOR:-ubuntu}
+DIR="$(dirname `readlink -f $0`)"
+
+INCLUDE_DEPENDENCIES=${INCLUDE_DEPENDENCIES:-true}
+
+function build_pkg {
+ case $1 in
+ ubuntu)
+ cd ${DIR}
+ rm -rf vswitchperf
+ git clone https://gerrit.opnfv.org/gerrit/vswitchperf
+ cd vswitchperf && git checkout ${VSPERF_REV} && cd ..
+ rm -rf vswitchperf/.git
+ tar cfvz ${DIR}/repositories/ubuntu/vswitchperf.tgz vswitchperf
+ rm -rf vswitchperf
+ ;;
+ *) echo "Not supported system"; exit 1;;
+ esac
+}
+
+for system in $BUILD_FOR
+do
+ build_pkg $system
+done
+
+