summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang, Yunhong <yunhong.jiang@intel.com>2016-08-27 00:34:54 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-27 00:34:54 +0000
commitbb8d2500ed21fc455a6bd2b6dccd0241b515508e (patch)
treeaafaad83cd886a0bfe2bf51f2a4b80daf30b0b59
parent76c2ed6659d79ee83c8fc4f00e955268779db826 (diff)
parent76aa5ea1c150396731e22389f86430ddc86a01d0 (diff)
Merge "CI integration for KVMforNFV."
-rwxr-xr-xci/test_kvmfornfv.sh13
-rw-r--r--docker_image_build/Dockerfile9
2 files changed, 18 insertions, 4 deletions
diff --git a/ci/test_kvmfornfv.sh b/ci/test_kvmfornfv.sh
index 45d1ea252..e507f37d7 100755
--- a/ci/test_kvmfornfv.sh
+++ b/ci/test_kvmfornfv.sh
@@ -1,15 +1,12 @@
#!/bin/bash
#############################################################
-## !!! The original test_kvmfornfv.sh is removed because it
-## break the verification process!!!
-#############################################################
## This script will launch ubuntu docker container
## runs cyclictest through yardstick
## and verifies the test results.
############################################################
-
+docker_image_dir=$WORKSPACE/docker_image_build
function env_clean {
container_id=`sudo docker ps -a | grep kvmfornfv |awk '{print $1}'`
sudo docker rm $container_id
@@ -21,6 +18,14 @@ function env_clean {
#Cleaning up the test environment before running cyclictest through yardstick.
env_clean
+#Creating a docker image with yardstick installed.
+( cd ${docker_image_dir}; sudo docker build -t kvmfornfv:latest --no-cache=true . )
+if [ ${?} -ne 0 ] ; then
+ echo "Docker image build failed"
+ id=$(sudo docker ps -a | head -2 | tail -1 | awk '{print $1}'); sudo docker rm -f $id
+ exit 1
+fi
+
time_stamp=$(date +%Y%m%d%H%M%S)
volume=/tmp/kvmtest-${time_stamp}
mkdir -p $volume/{image,rpm,scripts}
diff --git a/docker_image_build/Dockerfile b/docker_image_build/Dockerfile
new file mode 100644
index 000000000..fd1ea5883
--- /dev/null
+++ b/docker_image_build/Dockerfile
@@ -0,0 +1,9 @@
+#
+#Dockerfile for creating image with yardstick and its dependency
+#packages installed.
+#kvmfornfv1 image has all dependency packages installed.
+#
+FROM kvmfornfv1:latest
+RUN cd /root && git clone https://gerrit.opnfv.org/gerrit/p/yardstick.git -b stable/colorado
+RUN cd /root/yardstick && python setup.py install
+WORKDIR /root