Always clean Travis CI cache if build fails

This commit is contained in:
Brad Ison 2018-06-12 20:35:37 -04:00
parent 093a58558c
commit 23c01b40c5
No known key found for this signature in database
GPG key ID: 972D14B0BE6DE287
2 changed files with 5 additions and 1 deletions

View file

@ -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:

View file

@ -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}" "$@"
}