Merge pull request #535 from ericchiang/cleanup-docker-containers-after-travis-tests
*: cleanup containers generated during tests to avoid deploy conflicts
This commit is contained in:
commit
92920fa05d
2 changed files with 14 additions and 3 deletions
|
@ -34,6 +34,7 @@ script:
|
||||||
- ./test-functional
|
- ./test-functional
|
||||||
- DEX_TEST_DSN="sqlite3://:memory:" ./test-functional
|
- DEX_TEST_DSN="sqlite3://:memory:" ./test-functional
|
||||||
- ./build-docker
|
- ./build-docker
|
||||||
|
- ./build-docker clean
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
|
|
14
build-docker
14
build-docker
|
@ -35,7 +35,17 @@ push() {
|
||||||
docker push $repo:latest
|
docker push $repo:latest
|
||||||
}
|
}
|
||||||
|
|
||||||
build
|
clean() {
|
||||||
if [[ "push" == "$1" ]]; then
|
docker rmi $repo:$version
|
||||||
|
docker rmi $repo:latest
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "clean" == "$1" ]]; then
|
||||||
|
clean
|
||||||
|
else
|
||||||
|
build
|
||||||
|
if [[ "push" == "$1" ]]; then
|
||||||
push
|
push
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Reference in a new issue