Files
docker-docs/buildscripts/integrationtest.sh
Riyaz Faizullabhoy cb080ede06 Fix test_output path and remove
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-04-12 15:32:58 -07:00

35 lines
717 B
Bash
Executable File

#!/usr/bin/env bash
function cleanup {
docker-compose -f development.yml stop
# if we're in CircleCI, we cannot remove any containers
if [[ -z "${CIRCLECI}" ]]; then
docker-compose -f development.yml rm -f
fi
}
function cleanupAndExit {
cleanup
# Check for existence of SUCCESS
ls test_output/SUCCESS
exitCode=$?
# Clean up test_output dir and exit
rm -rf test_output
exit $exitCode
}
if [[ -z "${CIRCLECI}" ]]; then
BUILDOPTS="--force-rm"
fi
set -e
set -x
cleanup
docker-compose -f development.yml config
docker-compose -f development.yml build ${BUILDOPTS} --pull | tee
docker-compose -f development.yml up --abort-on-container-exit
trap cleanupAndExit SIGINT SIGTERM EXIT