From 1210fb5d8fff179b4d60aa5aae27ffbc2e75ed7f Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Mon, 1 Aug 2016 16:03:18 -0700 Subject: [PATCH] *: cleanup containers generated during tests to avoid deploy conflicts --- .travis.yml | 1 + build-docker | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6609105..75e3cab6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ script: - ./test-functional - DEX_TEST_DSN="sqlite3://:memory:" ./test-functional - ./build-docker + - ./build-docker clean deploy: provider: script diff --git a/build-docker b/build-docker index 4b07254c..299c7ef9 100755 --- a/build-docker +++ b/build-docker @@ -35,7 +35,17 @@ push() { docker push $repo:latest } -build -if [[ "push" == "$1" ]]; then - push +clean() { + docker rmi $repo:$version + docker rmi $repo:latest +} + +if [[ "clean" == "$1" ]]; then + clean +else + build + if [[ "push" == "$1" ]]; then + push + fi fi +