summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-12-08 13:51:09 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-08 13:51:09 +0000
commit3ed69deabb7d20ccdf2dfbbacb5ab48f3c9e044f (patch)
treef99d51138516363fa51faf8ea39963c5684077ae
parentf6add0a76589049a482308aff810658782f22ea9 (diff)
parentb1ee51cf44ab63dbfaf21834c90c8fb8adb0eb4e (diff)
Merge "functest,doctor: CLEAN_DOCKER_IMAGES"
-rw-r--r--jjb/doctor/doctor.yml4
-rw-r--r--jjb/functest/functest-ci-jobs.yml4
-rwxr-xr-xjjb/functest/functest-cleanup.sh2
3 files changed, 9 insertions, 1 deletions
diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml
index 7a5bd22f2..8a0d0155a 100644
--- a/jjb/doctor/doctor.yml
+++ b/jjb/doctor/doctor.yml
@@ -96,6 +96,10 @@
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'
description: 'Scenario to deploy and test'
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 1cded61fc..915828ca7 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -224,6 +224,10 @@
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}'
diff --git a/jjb/functest/functest-cleanup.sh b/jjb/functest/functest-cleanup.sh
index 4bedfe7de..3c4c7f965 100755
--- a/jjb/functest/functest-cleanup.sh
+++ b/jjb/functest/functest-cleanup.sh
@@ -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}'))