1
0
mirror of https://github.com/tmaier/docker-compose synced 2024-11-22 16:01:59 +01:00

Use DOCKER_AND_COMPOSE_VERSION_MATRIX also in push and test hooks

This commit is contained in:
Tobias L. Maier 2018-04-29 18:12:01 +02:00
parent 4b29dce360
commit 04d5b013f3
2 changed files with 8 additions and 13 deletions

@ -2,13 +2,11 @@
set -e set -e
docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}"
images=$(docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}"); while read -r docker_version compose_version;
for image in ${images};
do do
image=${DOCKER_REPO}:${docker_version}
echo "# Pushing image ${image}..." echo "# Pushing image ${image}..."
docker image push "${image}" docker image push "${image}"
echo "Exit code: $?" done < DOCKER_AND_COMPOSE_VERSION_MATRIX
done

@ -4,14 +4,11 @@ set -e
echo "Test Hook is starting" echo "Test Hook is starting"
docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}" while read -r docker_version compose_version;
images=$(docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}");
for image in ${images};
do do
image=${DOCKER_REPO}:${docker_version}
echo "# Testing image ${image}..." echo "# Testing image ${image}..."
export IMAGE_NAME=${image}; export IMAGE_NAME=${image};
docker-compose -f docker-compose.test.yml --rm run sut docker-compose -f docker-compose.test.yml --rm run sut
echo "Exit code: $?" done < DOCKER_AND_COMPOSE_VERSION_MATRIX
done