Add script to run tests in all docker images

This commit is contained in:
Zach Borboa
2018-07-29 00:14:56 -07:00
parent fb698471e6
commit 957bee4c76
13 changed files with 88 additions and 4 deletions
+15
View File
@@ -0,0 +1,15 @@
# Run image to create container.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set -x
cd "${SCRIPT_DIR}/../../.."
project_dir="${PWD}"
docker start "php56" ||
docker run \
--detach \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name="php56" \
--tty \
"php-curl-class/php56"
+3
View File
@@ -0,0 +1,3 @@
# Stop container.
docker stop "php56"
@@ -8,7 +8,7 @@ project_dir="${PWD}"
docker run \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name=php56 \
--name="php56" \
--rm \
--tty \
"php-curl-class/php56" /bin/bash
+15
View File
@@ -0,0 +1,15 @@
# Run image to create container.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set -x
cd "${SCRIPT_DIR}/../../.."
project_dir="${PWD}"
docker start "php70" ||
docker run \
--detach \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name="php70" \
--tty \
"php-curl-class/php70"
+3
View File
@@ -0,0 +1,3 @@
# Stop container.
docker stop "php70"
@@ -8,7 +8,7 @@ project_dir="${PWD}"
docker run \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name=php70 \
--name="php70" \
--rm \
--tty \
"php-curl-class/php70" /bin/bash
+15
View File
@@ -0,0 +1,15 @@
# Run image to create container.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set -x
cd "${SCRIPT_DIR}/../../.."
project_dir="${PWD}"
docker start "php71" ||
docker run \
--detach \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name="php71" \
--tty \
"php-curl-class/php71"
+3
View File
@@ -0,0 +1,3 @@
# Stop container.
docker stop "php71"
@@ -8,7 +8,7 @@ project_dir="${PWD}"
docker run \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name=php71 \
--name="php71" \
--rm \
--tty \
"php-curl-class/php71" /bin/bash
+15
View File
@@ -0,0 +1,15 @@
# Run image to create container.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set -x
cd "${SCRIPT_DIR}/../../.."
project_dir="${PWD}"
docker start "php72" ||
docker run \
--detach \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name="php72" \
--tty \
"php-curl-class/php72"
+3
View File
@@ -0,0 +1,3 @@
# Stop container.
docker stop "php72"
@@ -8,7 +8,7 @@ project_dir="${PWD}"
docker run \
--interactive \
--mount "type=bind,src=${project_dir},dst=/data,readonly=true" \
--name=php72 \
--name="php72" \
--rm \
--tty \
"php-curl-class/php72" /bin/bash
+12
View File
@@ -0,0 +1,12 @@
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}"
for d in "dockerfiles/"* ; do
echo "Running ${d}" &&
pushd "${d}" &&
bash "1_build.sh" &&
bash "2_start.sh" &&
bash "3_test.sh" &&
bash "4_stop.sh" &&
popd
done