From df6d97a6a5e6e63dbb4d51fbb98648b830cc6ebd Mon Sep 17 00:00:00 2001 From: Nathaniel Cook Date: Tue, 2 Feb 2016 13:46:13 -0700 Subject: [PATCH] add docker rm flag so circleci can disable deletion of containers --- circle-test.sh | 2 ++ test.sh | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/circle-test.sh b/circle-test.sh index de2a4a5f7f..6b34043b18 100755 --- a/circle-test.sh +++ b/circle-test.sh @@ -10,6 +10,8 @@ DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) cd $DIR export OUTPUT_DIR="$CIRCLE_ARTIFACTS" +# Don't delete the container since CircleCI doesn't have permission to do so. +export DOCKER_RM="false" # Get number of test environments. count=$(./test.sh count) diff --git a/test.sh b/test.sh index b228050a18..019e205aa1 100755 --- a/test.sh +++ b/test.sh @@ -32,6 +32,9 @@ PARALLELISM=${PARALLELISM-1} # Set default timeout TIMEOUT=${TIMEOUT-480s} +# Default to deleteing the container +DOCKER_RM=${DOCKER_RM-true} + # Update this value if you add a new test environment. ENV_COUNT=6 @@ -69,7 +72,7 @@ function run_test_docker { echo "Running test in docker $name with args $@" docker run \ - --rm \ + --rm=$DOCKER_RM \ -v "$DIR:/root/go/src/github.com/influxdb/influxdb" \ -e "INFLUXDB_DATA_ENGINE=$INFLUXDB_DATA_ENGINE" \ -e "GORACE=$GORACE" \