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:
parent
4b29dce360
commit
04d5b013f3
10
hooks/push
10
hooks/push
@ -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
|
|
||||||
|
11
hooks/test
11
hooks/test
@ -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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user