Mount a local image store directory to qtip container. 43/16943/2
authorwu.zhihui <wu.zhihui1@zte.com.cn>
Fri, 15 Jul 2016 03:40:54 +0000 (11:40 +0800)
committerwu.zhihui <wu.zhihui1@zte.com.cn>
Sat, 16 Jul 2016 01:50:53 +0000 (09:50 +0800)
Use docker run with parameter -v.

The image file QTIP_CentOS.qcow2 is downloaded each time.
To save the execution time of CI, mount this file to a local
directory of qtip container.

Change-Id: I86350e4af872001a74d37d1e8d481c565be0de28
Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
jjb/qtip/qtip-ci-jobs.yml

index 36f026d..068b273 100644 (file)
             echo "Qtip: Start Docker and prepare environment"
             envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}"
             suite="TEST_CASE=all"
+            dir_imgstore="${HOME}/imgstore"
+            img_volume="${dir_imgstore}:/home/opnfv/imgstore"
             docker pull opnfv/qtip:latest
-            cmd=" docker run -id -e $envs -e $suite opnfv/qtip:latest /bin/bash"
+            cmd=" docker run -id -e $envs -e $suite -v ${img_volume} opnfv/qtip:latest /bin/bash"
             echo "Qtip: Running docker run command: ${cmd}"
             ${cmd}
             docker ps -a