summaryrefslogtreecommitdiffstats
path: root/src/fuel-plugin/pre_build_hook
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuel-plugin/pre_build_hook')
-rwxr-xr-xsrc/fuel-plugin/pre_build_hook18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/fuel-plugin/pre_build_hook b/src/fuel-plugin/pre_build_hook
index c0d35d4f..d264d0bf 100755
--- a/src/fuel-plugin/pre_build_hook
+++ b/src/fuel-plugin/pre_build_hook
@@ -13,19 +13,23 @@ DIR="$(dirname `readlink -f $0`)"
function build_pkg {
case $1 in
ubuntu)
- cd ${DIR}
- rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu
- rm -rf collectd-ceilometer-plugin
+ sudo rm -rf ${DIR}/build; mkdir -p ${DIR}/build
+
+ cd ${DIR}/build
git clone https://github.com/openstack/collectd-ceilometer-plugin
cd collectd-ceilometer-plugin
git checkout 73372f2eb86c81f12bc10b392f75050a401107db
- tar cfvz ${DIR}/repositories/ubuntu/collectd-ceilometer.tgz . --exclude=collectd-ceilometer.tgz
- cd ..; rm -rf collectd-ceilometer-plugin
# build collectd
cd ${DIR}
- sudo docker build -t collectd_build .
- sudo docker run -v${DIR}/repositories/ubuntu:/build -t collectd_build /build-collectd.sh
+ sudo docker build -t collectd_build .
+ sudo docker run -v ${DIR}:/fuel-plugin -t collectd_build /fuel-plugin/build-collectd.sh
+
+ rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu
+ cd ${DIR}/build
+ mv *.deb ${DIR}/repositories/ubuntu
+ tar cfvz ${DIR}/repositories/ubuntu/collectd-ceilometer.tgz .
+ cd ..; sudo rm -rf ${DIR}/build
;;
*) echo "Not supported system"; exit 1;;
esac