Merge "functest,doctor: CLEAN_DOCKER_IMAGES"
authorMorgan Richomme <morgan.richomme@orange.com>
Thu, 8 Dec 2016 13:51:09 +0000 (13:51 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 8 Dec 2016 13:51:09 +0000 (13:51 +0000)
jjb/doctor/doctor.yml
jjb/functest/functest-ci-jobs.yml
jjb/functest/functest-cleanup.sh

index 7a5bd22..8a0d015 100644 (file)
             name: DOCKER_TAG
             default: '{docker-tag}'
             description: 'Tag to pull docker image'
+        - string:
+            name: CLEAN_DOCKER_IMAGES
+            default: 'false'
+            description: 'Remove downloaded docker images (opnfv/functest:*)'
         - string:
             name: DEPLOY_SCENARIO
             default: 'os-nosdn-nofeature-ha'
index 1cded61..915828c 100644 (file)
             name: DOCKER_TAG
             default: '{docker-tag}'
             description: 'Tag to pull docker image'
+        - string:
+            name: CLEAN_DOCKER_IMAGES
+            default: 'true'
+            description: 'Remove downloaded docker images (opnfv/functest:*)'
         - functest-parameter:
             gs-pathname: '{gs-pathname}'
 
index 4bedfe7..3c4c7f9 100755 (executable)
@@ -10,7 +10,7 @@ if [[ ! -z $(docker ps -a | grep opnfv/functest) ]]; then
 fi
 
 # Remove existing images if exist
-if [[ ! -z $(docker images | grep opnfv/functest) ]]; then
+if [[ $CLEAN_DOCKER_IMAGES ]] && [[ ! -z $(docker images | grep opnfv/functest) ]]; then
     echo "Docker images to remove:"
     docker images | head -1 && docker images | grep opnfv/functest >${redirect}
     image_tags=($(docker images | grep opnfv/functest | awk '{print $2}'))