2015-02-25 14:52:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# This should be run inside a container built from the Dockerfile
|
|
|
|
# at the root of the repo - script/test will do it automatically.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
>&2 echo "Running lint checks"
|
2015-08-25 16:57:21 +02:00
|
|
|
docker run --rm \
|
|
|
|
${GIT_VOLUME} \
|
|
|
|
--entrypoint="tox" \
|
|
|
|
"$TAG" -e pre-commit
|
2015-02-25 14:52:55 +01:00
|
|
|
|
|
|
|
if [ "$DOCKER_VERSIONS" == "" ]; then
|
2015-03-31 22:04:22 +02:00
|
|
|
DOCKER_VERSIONS="default"
|
2015-02-25 14:52:55 +01:00
|
|
|
elif [ "$DOCKER_VERSIONS" == "all" ]; then
|
|
|
|
DOCKER_VERSIONS="$ALL_DOCKER_VERSIONS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for version in $DOCKER_VERSIONS; do
|
|
|
|
>&2 echo "Running tests against Docker $version"
|
2015-03-23 22:16:14 +01:00
|
|
|
docker run \
|
2015-02-25 14:52:55 +01:00
|
|
|
--rm \
|
|
|
|
--privileged \
|
|
|
|
--volume="/var/lib/docker" \
|
2015-05-28 20:02:19 +02:00
|
|
|
--volume="${COVERAGE_DIR:-$(pwd)/coverage-html}:/code/coverage-html" \
|
2015-02-25 14:52:55 +01:00
|
|
|
-e "DOCKER_VERSION=$version" \
|
2015-08-12 16:36:10 +02:00
|
|
|
-e "DOCKER_DAEMON_ARGS" \
|
2015-02-25 14:52:55 +01:00
|
|
|
--entrypoint="script/dind" \
|
|
|
|
"$TAG" \
|
2015-07-03 04:35:20 +02:00
|
|
|
script/wrapdocker tox -e py27,py34 -- "$@"
|
2015-02-25 14:52:55 +01:00
|
|
|
done
|