Do not ignore docker history command errors. (#298)

master
Damon Kohler 2017-05-19 08:29:09 +02:00 committed by GitHub
parent 56fc2a9a92
commit 34b750977b
1 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,8 @@ set -o pipefail
if [[ ${TRAVIS_BRANCH} == "master" ]] && if [[ ${TRAVIS_BRANCH} == "master" ]] &&
[[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then [[ ${TRAVIS_PULL_REQUEST} == "false" ]]; then
mkdir -p $(dirname ${DOCKER_CACHE_FILE}); mkdir -p $(dirname ${DOCKER_CACHE_FILE})
docker save $(docker history -q cartographer:${LSB_RELEASE} | IMAGE_NAMES=$(docker history -q cartographer:${LSB_RELEASE} | grep -v '<missing>')
grep -v '<missing>') | gzip > ${DOCKER_CACHE_FILE}; docker save ${IMAGE_NAMES} | gzip > ${DOCKER_CACHE_FILE}.new
mv ${DOCKER_CACHE_FILE}.new ${DOCKER_CACHE_FILE}
fi fi