Set timeout of Dovetail jobs to be 240 and don't remove the stable images 69/40669/1
authorxudan <xudan16@huawei.com>
Wed, 30 Aug 2017 08:11:01 +0000 (04:11 -0400)
committerxudan <xudan16@huawei.com>
Wed, 30 Aug 2017 08:11:01 +0000 (04:11 -0400)
1. Jobs on Compass are always built time out and aborted.
2. Dovetail needs about 2 hours for all the test cases.
3. However, due to the slow internet speed, it will take a long time to pull
   releng source code and dovetail docker image.
4. Extend the time to 240 minutes.
5. Don't remove the stable docker images, so it don't need to pull every time.

JIRA: DOVETAIL-491

Change-Id: I9c7255a89eebf5770c0854224cd65e7413916078
Signed-off-by: xudan <xudan16@huawei.com>
jjb/dovetail/dovetail-ci-jobs.yml
jjb/dovetail/dovetail-cleanup.sh

index 92b1db3..f6dda5f 100644 (file)
         - build-name:
             name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
         - timeout:
-            timeout: 180
+            timeout: 240
             abort: true
         - fix-workspace-permissions
 
index 3ae0cbc..2d66fe0 100755 (executable)
 # clean up dependent project docker images, which has no containers and image tag None
 clean_images=(opnfv/functest opnfv/yardstick opnfv/testapi mongo)
 for clean_image in "${clean_images[@]}"; do
-    echo "Removing image $image_id, which has no containers and image tag is None"
     dangling_images=($(docker images -f "dangling=true" | grep ${clean_image} | awk '{print $3}'))
     if [[ -n ${dangling_images} ]]; then
         for image_id in "${dangling_images[@]}"; do
+            echo "Removing image $image_id, which has no containers and image tag is None"
             docker rmi $image_id >${redirect}
         done
     fi
 done
 
-echo "Remove containers with image opnfv/dovetail:<None>..."
+echo "Remove dovetail images with tag None and containers with these images ..."
 dangling_images=($(docker images -f "dangling=true" | grep opnfv/dovetail | awk '{print $3}'))
 if [[ -n ${dangling_images} ]]; then
     for image_id in "${dangling_images[@]}"; do
@@ -37,13 +37,13 @@ if [[ ! -z $(docker ps -a | grep opnfv/dovetail) ]]; then
     docker ps -a | grep opnfv/dovetail | awk '{print $1}' | xargs docker rm -f >${redirect}
 fi
 
-echo "Remove dovetail existing images if exist..."
-if [[ ! -z $(docker images | grep opnfv/dovetail) ]]; then
-    echo "Docker images to remove:"
-    docker images | head -1 && docker images | grep opnfv/dovetail >${redirect}
-    image_tags=($(docker images | grep opnfv/dovetail | awk '{print $2}'))
-    for tag in "${image_tags[@]}"; do
-        echo "Removing docker image opnfv/dovetail:$tag..."
-        docker rmi opnfv/dovetail:$tag >${redirect}
-    done
-fi
+#echo "Remove dovetail existing images if exist..."
+#if [[ ! -z $(docker images | grep opnfv/dovetail) ]]; then
+#    echo "Docker images to remove:"
+#    docker images | head -1 && docker images | grep opnfv/dovetail >${redirect}
+#    image_tags=($(docker images | grep opnfv/dovetail | awk '{print $2}'))
+#    for tag in "${image_tags[@]}"; do
+#        echo "Removing docker image opnfv/dovetail:$tag..."
+#        docker rmi opnfv/dovetail:$tag >${redirect}
+#    done
+#fi