From 23c01b40c5b3c6cfb261a52872c82ee6e4920896 Mon Sep 17 00:00:00 2001 From: Brad Ison Date: Tue, 12 Jun 2018 20:35:37 -0400 Subject: [PATCH] Always clean Travis CI cache if build fails --- .travis.yml | 4 ++++ scripts/ci | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 169228c72..3b29e012a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,10 @@ before_script: - sudo service mysql stop - sudo service postgresql stop +# Clean the cache if any step fails. +after_failure: + - scripts/ci clean + cache: timeout: 1000 directories: diff --git a/scripts/ci b/scripts/ci index 38b04afea..681e76faa 100755 --- a/scripts/ci +++ b/scripts/ci @@ -45,7 +45,7 @@ clean_cache() { quay_run() { - docker run --net=host --entrypoint "/bin/bash" -e TEST_DATABASE_URI -ti "${IMAGE}:${IMAGE_TAG}" -c "$*" + docker run --net=host -e TEST_DATABASE_URI -ti "${IMAGE}:${IMAGE_TAG}" "$@" }