diff options
Diffstat (limited to 'fuel-plugin/pre_build_hook')
-rwxr-xr-x | fuel-plugin/pre_build_hook | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fuel-plugin/pre_build_hook b/fuel-plugin/pre_build_hook index 0dfc36cbc..a3c883283 100755 --- a/fuel-plugin/pre_build_hook +++ b/fuel-plugin/pre_build_hook @@ -8,10 +8,14 @@ DIR="$(dirname `readlink -f $0`)" function build_pkg { case $1 in ubuntu) + rm -rf repositories/ubuntu; mkdir -p repositories/ubuntu sudo docker build -t kvm . - container_id=`sudo docker run -d kvm` - sudo docker cp $container_id:/linux-headers-4.4.6-rt14nfv_1.0.OPNFV_amd64.deb ${DIR}/repositories/ubuntu/ - sudo docker cp $container_id:/linux-image-4.4.6-rt14nfv_1.0.OPNFV_amd64.deb ${DIR}/repositories/ubuntu/ + + # run /kvmfornfv/fuel-plugin/build_kvm.sh in docker + sudo docker run -v ${DIR}/..:/kvmfornfv -t kvm /kvmfornfv/fuel-plugin/build_kvm.sh + # debug in console by the following command + # sudo docker run -v /kvmfornfv:/kvmfornfv -ti kvm /bin/bash + cp ${DIR}/../*.deb repositories/ubuntu ;; *) echo "Not supported system"; exit 1;; esac |