summaryrefslogtreecommitdiffstats
path: root/fuel-plugin/pre_build_hook
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-05-03 09:22:42 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-05-03 10:31:16 +0800
commitfc3228bd6c2163081143e2231e0574faa9bcaad1 (patch)
treea44d48fe8b04121029523ee96a9bbb1936dd19d3 /fuel-plugin/pre_build_hook
parentbacb4acf4ed1a5b6481d613a6dc2e8c9ccff15db (diff)
Create fuel kvm plugin
Upstream status: NA In Brahmaputra release, KVM plugin functionality was bundled inside the fuel-plugin-qemu. In order for easy maintenance, the KVM plugin functionality would be separated from fuel-plugin-qemu and moved into an independent fuel-plugin-kvm and keep the source code here starting from Colorado release. Change-Id: Id89069234a4529cca40f1887e2d947378f928dd2 Signed-off-by: davidjchou <david.j.chou@intel.com> Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'fuel-plugin/pre_build_hook')
-rw-r--r--fuel-plugin/pre_build_hook23
1 files changed, 23 insertions, 0 deletions
diff --git a/fuel-plugin/pre_build_hook b/fuel-plugin/pre_build_hook
new file mode 100644
index 000000000..9b3b93116
--- /dev/null
+++ b/fuel-plugin/pre_build_hook
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -eux
+
+BUILD_FOR=${BUILD_FOR:-ubuntu}
+DIR="$(dirname `readlink -f $0`)"
+
+function build_pkg {
+ case $1 in
+ ubuntu)
+ sudo docker build -t kvm .
+ container_id=`sudo docker run -d kvm`
+ sudo docker cp $container_id:/linux-headers-4.1.10-rt10nfv_1.0.OPNFV_amd64.deb ${DIR}/repositories/ubuntu/
+ sudo docker cp $container_id:/linux-image-4.1.10-rt10nfv_1.0.OPNFV_amd64.deb ${DIR}/repositories/ubuntu/
+ ;;
+ *) echo "Not supported system"; exit 1;;
+ esac
+}
+
+for system in $BUILD_FOR
+do
+ build_pkg $system
+done