From e115a87ae5d9d8f8572df8b0eca8af5fc3ce3555 Mon Sep 17 00:00:00 2001 From: Stefan Riepenhausen Date: Thu, 13 Jun 2024 15:49:11 +0200 Subject: [PATCH] add test with tag --- test.sh | 14 ++++++++++++-- testing/compose_config.tag.mk | 5 +++++ testing/docker-compose.tag.yml | 4 ++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 testing/compose_config.tag.mk create mode 100644 testing/docker-compose.tag.yml diff --git a/test.sh b/test.sh index 88d79e1..42d08f0 100755 --- a/test.sh +++ b/test.sh @@ -30,7 +30,7 @@ function test_with_minimal_vars_compose(){ cp $TESTS/compose_config.mk config.mk cp $TESTS/docker-compose.yml . make deploy - rm -f docker-compose.yml + rm -f docker-compose.yml config.mk } function test_with_minimal_vars_compose_file(){ @@ -38,7 +38,16 @@ function test_with_minimal_vars_compose_file(){ cp $TESTS/compose_file_config.mk config.mk cp $TESTS/docker-compose.yml . make deploy - rm -f docker-compose.yml + rm -f docker-compose.yml config.mk +} + +function test_with_minimal_vars_compose_and_tag(){ + echo "::::::::: $FUNCNAME ::::::::::::" + cp $TESTS/compose_config.tag.mk config.mk + cp $TESTS/docker-compose.tag.yml docker-compose.yml + echo "TAG=3.17" > .env + make deploy + rm -f docker-compose.yml config.mk } prepdir @@ -46,5 +55,6 @@ prepdir test_with_minimal_vars_apt test_with_minimal_vars_compose test_with_minimal_vars_compose_file +test_with_minimal_vars_compose_and_tag cleandir diff --git a/testing/compose_config.tag.mk b/testing/compose_config.tag.mk new file mode 100644 index 0000000..c63ecb7 --- /dev/null +++ b/testing/compose_config.tag.mk @@ -0,0 +1,5 @@ +DEPLOY_NAME = make-deploy-test-compose-tag +DEPLOY_PATH = /tmp +DEPLOY_HOSTS = localhost +DEPLOY_TYPE = compose +SSH_USER = $(USER) diff --git a/testing/docker-compose.tag.yml b/testing/docker-compose.tag.yml new file mode 100644 index 0000000..c6cee18 --- /dev/null +++ b/testing/docker-compose.tag.yml @@ -0,0 +1,4 @@ +services: + curl: + image: "alpine:${TAG}" + command: cat /etc/os-release