aboutsummaryrefslogtreecommitdiffstats
path: root/fuel-plugin/pre_build_hook
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-06-21 03:03:32 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-06-21 03:05:17 +0800
commit675eef731a098f83aa98c2021b151b7e5ba1da7d (patch)
tree77593df19c82bad2844743034600a93aa0255239 /fuel-plugin/pre_build_hook
parent3ec9f7fbd9ed74126ae92be3e7d4c16b39674987 (diff)
Add fuel plugin for Yardstick
1. fuel can deploy yardstick 2. todo: fuel run yardstick Change-Id: If1a4b178187d78bdc2d4c3b6469faff78dc51ead Signed-off-by: Chou, David J <david.j.chou@intel.com> Signed-off-by: Hinman, John <john.hinman@intel.com> Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'fuel-plugin/pre_build_hook')
-rwxr-xr-xfuel-plugin/pre_build_hook31
1 files changed, 31 insertions, 0 deletions
diff --git a/fuel-plugin/pre_build_hook b/fuel-plugin/pre_build_hook
new file mode 100755
index 000000000..9446d2a1a
--- /dev/null
+++ b/fuel-plugin/pre_build_hook
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -eux
+
+BUILD_FOR=${BUILD_FOR:-ubuntu}
+DIR="$(dirname `readlink -f $0`)"
+
+function build_pkg {
+ case $1 in
+ ubuntu)
+ rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu
+
+ # don't support online installation now
+ # cd ${DIR}/repositories/ubuntu
+ # Use aptititude; apt-get -d will skip download if package is already installed
+ # sudo apt-get install aptitude -y
+ # Download python packages into the repository
+ # aptitude download python-virtualenv python-dev libffi-dev libssl-dev
+
+ cd ${DIR}/..
+ tar -czf ${DIR}/repositories/ubuntu/yardstick.tar.gz . --exclude=yardstick.tar.gz
+ ;;
+
+ *) echo "Not supported system"; exit 1;;
+ esac
+}
+
+for system in $BUILD_FOR
+do
+ build_pkg $system
+done