From 5862046cf120ba694232f9a76704c306ff313b85 Mon Sep 17 00:00:00 2001 From: Artur Zarzycki Date: Tue, 24 Jan 2017 09:05:53 +0100 Subject: [PATCH] Ignore errors on remove images from local registry Ignore errors when we go through all images with trying remove them from local registry and some of them from some reasons wasn't uploaded to registry. Change-Id: Ica0f4771071b48d4d0a17091487892c3becd40b1 --- jenkins-tp/jobs/builders/fuel-ccp-simple-deployment.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkins-tp/jobs/builders/fuel-ccp-simple-deployment.sh b/jenkins-tp/jobs/builders/fuel-ccp-simple-deployment.sh index 5f95d67..27e7a42 100644 --- a/jenkins-tp/jobs/builders/fuel-ccp-simple-deployment.sh +++ b/jenkins-tp/jobs/builders/fuel-ccp-simple-deployment.sh @@ -136,9 +136,11 @@ ${SSH_COMMAND} "pushd fuel-ccp && APT_CACHE_SERVER=http://${APT_CACHE_SERVER_IP} docker exec "${REGISTRY_HASH}" chgrp -R "${JENKINS_GID}" /var/lib/registry docker exec "${REGISTRY_HASH}" chmod -R g+w /var/lib/registry +set +e for i in `curl http://${REGISTRY_IP}:${REGISTRY_PORT}/v2/_catalog | jq -r '.repositories[]'`; do REGISTRY_DATA_DIR=/home/jenkins/registry/data/docker/registry/v2/ /home/jenkins/registry/delete_docker_registry_image.py --image "${i}":"${ZUUL_CHANGE}" done +set -e # Revert to fresh to decrease image size dos.py revert "${FUEL_DEVOPS_ENV_NAME}" "${FUEL_DEVOPS_SNAPSHOT_NAME}"