WIP: REPO-5266 Remove duplicate TAS code (#2)

This commit is contained in:
Alan Davis
2020-07-30 08:42:48 +01:00
committed by GitHub
parent 19480aca36
commit bce77b4516
14 changed files with 3681 additions and 3556 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
export DOCKER_COMPOSE_PATH=$1
export CLEAN_UP="$2"
if [ -z "$DOCKER_COMPOSE_PATH" ]
then
@@ -8,6 +9,22 @@ then
exit 1
fi
# Cleans up any generated images. These are created if the docker-compose file has "build:" clauses. They are not
# recreated if an image with the same name already exist. Also cleans up existing containers. Generally only needed on
# dev systems, however...
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
if [ "$CLEAN_UP" != "no-clean-up" ]
then
docker-compose --file "${DOCKER_COMPOSE_PATH}" kill
docker-compose --file "${DOCKER_COMPOSE_PATH}" rm -f
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
if [ -n "$GENERATED_IMAGES" ]
then
docker image rm -f $GENERATED_IMAGES
fi
fi
echo "Starting ACS stack in ${DOCKER_COMPOSE_PATH}"
# .env files are picked up from project directory correctly on docker-compose 1.23.0+