2015-07-28 03:08:04 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Run the integration tests with multiple versions of the Docker engine
|
|
|
|
|
|
|
|
set -e
|
2015-07-31 00:38:33 +02:00
|
|
|
set -x
|
2015-07-28 03:08:04 +02:00
|
|
|
|
2016-03-30 22:55:24 +02:00
|
|
|
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2015-07-28 03:08:04 +02:00
|
|
|
|
2015-08-04 20:49:55 +02:00
|
|
|
if [ "$1" == "-d" ]; then
|
2016-03-30 22:55:24 +02:00
|
|
|
# Drivers to use for Docker engines the tests are going to create.
|
|
|
|
STORAGE_DRIVER=${STORAGE_DRIVER:-overlay}
|
|
|
|
|
|
|
|
docker daemon --log-level=panic --storage-driver="$STORAGE_DRIVER" &
|
|
|
|
DOCKER_PID=$!
|
|
|
|
|
|
|
|
# Wait for it to become reachable.
|
|
|
|
tries=10
|
|
|
|
until docker version &> /dev/null; do
|
|
|
|
(( tries-- ))
|
|
|
|
if [ $tries -le 0 ]; then
|
|
|
|
echo >&2 "error: daemon failed to start"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
|
|
|
trap "kill $DOCKER_PID" EXIT
|
2015-07-28 03:08:04 +02:00
|
|
|
fi
|
|
|
|
|
2016-03-30 22:55:24 +02:00
|
|
|
distimage=$(docker build -q $DIR/../..)
|
|
|
|
fullversion=$(git describe --match 'v[0-9]*' --dirty='.m' --always)
|
|
|
|
distversion=${fullversion:1}
|
2015-07-31 00:38:33 +02:00
|
|
|
|
2016-03-30 22:55:24 +02:00
|
|
|
echo "Testing image $distimage with distribution version $distversion"
|
2015-07-28 03:08:04 +02:00
|
|
|
|
2016-03-30 22:55:24 +02:00
|
|
|
# Pull needed images before invoking golem to get pull time
|
|
|
|
# These images are defined in golem.conf
|
|
|
|
time docker pull nginx:1.9
|
|
|
|
time docker pull golang:1.6
|
|
|
|
time docker pull registry:0.9.1
|
|
|
|
time docker pull dmcgowan/token-server:simple
|
|
|
|
time docker pull dmcgowan/token-server:oauth
|
|
|
|
time docker pull distribution/golem-runner:0.1-bats
|
2015-07-28 03:08:04 +02:00
|
|
|
|
2016-03-30 22:55:24 +02:00
|
|
|
time docker pull docker:1.9.1-dind
|
|
|
|
time docker pull docker:1.10.3-dind
|
|
|
|
time docker pull dockerswarm/dind:1.11.0-rc2
|
2015-07-31 00:38:33 +02:00
|
|
|
|
2016-03-30 22:55:24 +02:00
|
|
|
golem \
|
|
|
|
-i "golem-distribution:latest,$distimage,$distversion" \
|
|
|
|
-i "golem-dind:latest,docker:1.9.1-dind,1.9.1" \
|
|
|
|
-i "golem-dind:latest,docker:1.10.3-dind,1.10.3" \
|
|
|
|
-i "golem-dind:latest,dockerswarm/dind:1.11.0-rc2,1.11.0" \
|
|
|
|
$DIR
|
2015-07-31 00:38:33 +02:00
|
|
|
|