mirror of https://github.com/docker/docs.git
Add additional check and cleanups to integration test
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
parent
edef1cd5c8
commit
cb86cf5d1a
|
@ -8,6 +8,18 @@ function cleanup {
|
|||
fi
|
||||
}
|
||||
|
||||
function cleanupAndExit {
|
||||
cleanup
|
||||
# Check for existence of SUCCESS
|
||||
ls test_output/SUCCESS
|
||||
exitCode=$?
|
||||
# Clean up test_output dir (if not in CircleCI) and exit
|
||||
if [[ -z "${CIRCLECI}" ]]; then
|
||||
rm -rf test_output
|
||||
fi
|
||||
exit $exitCode
|
||||
}
|
||||
|
||||
if [[ -z "${CIRCLECI}" ]]; then
|
||||
BUILDOPTS="--force-rm"
|
||||
fi
|
||||
|
@ -17,7 +29,8 @@ set -x
|
|||
|
||||
cleanup
|
||||
|
||||
docker-compose -f development.rethink.yml config
|
||||
docker-compose -f development.rethink.yml build ${BUILDOPTS} --pull | tee
|
||||
docker-compose -f development.rethink.yml up --abort-on-container-exit
|
||||
|
||||
trap cleanup SIGINT SIGTERM EXIT
|
||||
trap cleanupAndExit SIGINT SIGTERM EXIT
|
||||
|
|
|
@ -47,4 +47,4 @@ bin/notary ${OPTS} delegation list ${REPONAME} | grep targets/releases
|
|||
cat README.md | bin/notary ${OPTS} verify $REPONAME readmetarget > /test_output/SUCCESS
|
||||
|
||||
# Make this file accessible for CI
|
||||
chmod 777 /test_output/SUCCESS
|
||||
chmod -R 777 /test_output
|
||||
|
|
|
@ -78,6 +78,10 @@ services:
|
|||
- rdb-01
|
||||
- rdb-02
|
||||
client:
|
||||
volumes:
|
||||
- ./test_output:/test_output
|
||||
networks:
|
||||
- rdb
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
|
Loading…
Reference in New Issue