2015-02-23 12:01:37 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# See CONTRIBUTING.md for usage.
|
|
|
|
|
2014-09-30 22:48:01 +02:00
|
|
|
set -ex
|
2015-02-23 12:01:37 +01:00
|
|
|
|
2019-04-10 21:05:02 +02:00
|
|
|
TAG="docker-compose:alpine-$(git rev-parse --short HEAD)"
|
2015-02-23 12:01:37 +01:00
|
|
|
|
2019-04-12 18:46:06 +02:00
|
|
|
# By default use the Dockerfile, but can be overridden to use an alternative file
|
2019-04-23 09:52:35 +02:00
|
|
|
# e.g DOCKERFILE=Dockerfile.s390x script/test/default
|
2019-04-12 18:46:06 +02:00
|
|
|
DOCKERFILE="${DOCKERFILE:-Dockerfile}"
|
2019-04-10 21:05:02 +02:00
|
|
|
DOCKER_BUILD_TARGET="${DOCKER_BUILD_TARGET:-build}"
|
2017-02-08 13:33:57 +01:00
|
|
|
|
2015-05-28 20:02:19 +02:00
|
|
|
rm -rf coverage-html
|
2015-08-25 16:57:21 +02:00
|
|
|
# Create the host directory so it's owned by $USER
|
|
|
|
mkdir -p coverage-html
|
2015-05-28 20:02:19 +02:00
|
|
|
|
2019-04-12 18:46:06 +02:00
|
|
|
docker build -f "${DOCKERFILE}" -t "${TAG}" --target "${DOCKER_BUILD_TARGET}" .
|
2015-08-25 16:57:21 +02:00
|
|
|
|
|
|
|
GIT_VOLUME="--volume=$(pwd)/.git:/code/.git"
|
2016-01-15 22:35:26 +01:00
|
|
|
. script/test/all
|