summaryrefslogtreecommitdiffstats
path: root/src/fuel-plugin/pre_build_hook
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-07-12 01:57:52 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-07-12 01:58:53 +0800
commit54ea933ac9643d2d2f3714aa06afc978fc60551e (patch)
treec8df88f89aa75f095af4fbe7d3a3b64746c9f16a /src/fuel-plugin/pre_build_hook
parent215a65015908064b6ca996286584933002f0287a (diff)
Add Fuel Plugin
Change-Id: Ib1a4b7057678e435683b23692310f4e309c3fe10 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'src/fuel-plugin/pre_build_hook')
-rwxr-xr-xsrc/fuel-plugin/pre_build_hook30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/fuel-plugin/pre_build_hook b/src/fuel-plugin/pre_build_hook
new file mode 100755
index 0000000..eda8601
--- /dev/null
+++ b/src/fuel-plugin/pre_build_hook
@@ -0,0 +1,30 @@
+#!/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
+
+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
+ git clone https://github.com/openstack/collectd-ceilometer-plugin
+ cd collectd-ceilometer-plugin
+ git checkout 3a4a1087566d1f9e8dd2d8d2e0608cb975942446
+ tar cfvz ${DIR}/repositories/ubuntu/collectd-ceilometer.tgz . --exclude=collectd-ceilometer.tgz
+ cd ..; rm -rf collectd-ceilometer-plugin
+ ;;
+ *) echo "Not supported system"; exit 1;;
+ esac
+}
+
+for system in $BUILD_FOR
+do
+ build_pkg $system
+done