Add dind test runner
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
f6716e73c9
commit
06de74a4e9
3 changed files with 138 additions and 0 deletions
29
contrib/docker-integration/run.sh
Executable file
29
contrib/docker-integration/run.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
||||
|
||||
# Root directory of Distribution
|
||||
DISTRIBUTION_ROOT=$(cd ../..; pwd -P)
|
||||
|
||||
# Image containing the integration tests environment.
|
||||
INTEGRATION_IMAGE=${INTEGRATION_IMAGE:-distribution/docker-integration}
|
||||
|
||||
# Make sure we upgrade the integration environment.
|
||||
# Not yet on hub, run `docker build -t distribution/docker-integration .`
|
||||
#docker pull $INTEGRATION_IMAGE
|
||||
|
||||
# Start the integration tests in a Docker container.
|
||||
ID=$(docker run -d -t --privileged \
|
||||
-v ${DISTRIBUTION_ROOT}:/go/src/github.com/docker/distribution \
|
||||
-e "DOCKER_IMAGE=$DOCKER_IMAGE" \
|
||||
-e "DOCKER_VERSION=$DOCKER_VERSION" \
|
||||
-e "STORAGE_DRIVER=$STORAGE_DRIVER" \
|
||||
-e "EXEC_DRIVER=$EXEC_DRIVER" \
|
||||
${INTEGRATION_IMAGE} \
|
||||
./test_runner.sh "$@")
|
||||
|
||||
# Clean it up when we exit.
|
||||
trap "docker rm -f -v $ID > /dev/null" EXIT
|
||||
|
||||
docker logs -f $ID
|
Loading…
Add table
Add a link
Reference in a new issue