Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
docker-shib-test/ci/test.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
34 lines (27 sloc)
697 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run automated tests | |
# | |
# Example: | |
# | |
# ci/test.sh | |
# | |
# Returns exit code 0 on success, or 1 on failure | |
echo "[INFO] $0 started at $(date)" | |
# Set default exit code to return | |
EXIT_CODE=0 | |
# Bring up the test container and its dependencies | |
echo "[INFO] Starting test container" | |
if ! docker-compose up --force-recreate --quiet-pull --renew-anon-volumes test | |
then | |
echo "[ERROR] Test container failed (exit code $?)" | |
EXIT_CODE=1 | |
fi | |
# Shut down the containers | |
echo "[INFO] Shutting down containers" | |
if ! docker-compose down --volumes | |
then | |
echo "[ERROR] Shutting down containers failed (exit code $?)" | |
EXIT_CODE=1 | |
fi | |
echo "[INFO] $0 finished at $(date)" | |
exit $EXIT_CODE |