1
0
mirror of https://github.com/tmaier/docker-compose synced 2024-11-22 07:51:58 +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
docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}"
images=$(docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}");
for image in ${images};
while read -r docker_version compose_version;
do
image=${DOCKER_REPO}:${docker_version}
echo "# Pushing image ${image}..."
docker image push "${image}"
echo "Exit code: $?"
done
done < DOCKER_AND_COMPOSE_VERSION_MATRIX

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