CI integration for KVMforNFV. 95/19395/2
authorswatisharma <swatix.sharma@intel.com>
Tue, 23 Aug 2016 18:35:03 +0000 (00:05 +0530)
committerswatisharma <swatix.sharma@intel.com>
Wed, 24 Aug 2016 09:46:34 +0000 (15:16 +0530)
This patch contains scripts for creating a ubuntu docker
image with yardstick and all its dependency packages
installed for running cyclictest.

Co-Authored-By: Gundarapu Reddy <reddyx.gundarapu@intel.com>
Signed-off-by: Swati Sharma <swatix.sharma@intel.com>
ci/test_kvmfornfv.sh
docker_image_build/Dockerfile [new file with mode: 0644]

index 45d1ea2..e507f37 100755 (executable)
@@ -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 (file)
index 0000000..fd1ea58
--- /dev/null
@@ -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