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
|
||||
|
||||
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
|
||||
|
11
hooks/test
11
hooks/test
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user