From 0c7817f90387e8ca15b328a58985ed22ddb7c052 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 14 Jul 2021 16:39:24 +1000 Subject: [PATCH] DCD-1313: Use a Dockerfile argument rather than sed to inject test image. --- func-tests/confluence/{Dockerfile.tmpl => Dockerfile} | 3 ++- func-tests/confluence/inject-license | 1 - func-tests/docker-compose.yml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) rename func-tests/confluence/{Dockerfile.tmpl => Dockerfile} (76%) diff --git a/func-tests/confluence/Dockerfile.tmpl b/func-tests/confluence/Dockerfile similarity index 76% rename from func-tests/confluence/Dockerfile.tmpl rename to func-tests/confluence/Dockerfile index 1ac23b1..bad9fd8 100644 --- a/func-tests/confluence/Dockerfile.tmpl +++ b/func-tests/confluence/Dockerfile @@ -1,4 +1,5 @@ -FROM INJECT_BASE_IMAGE_HERE +ARG TEST_TARGET_IMAGE +FROM $TEST_TARGET_IMAGE COPY confluence-home/ /var/atlassian/application-data/confluence/ RUN chown -R confluence.confluence /var/atlassian/application-data/confluence diff --git a/func-tests/confluence/inject-license b/func-tests/confluence/inject-license index bae7f9f..58ec315 100755 --- a/func-tests/confluence/inject-license +++ b/func-tests/confluence/inject-license @@ -3,4 +3,3 @@ CONFLUENCE_TEST_LICENSE=`echo ${CONFLUENCE_TEST_LICENSE} | tr -d '\n \t'` sed "s~INJECT_LICENSE_HERE~${CONFLUENCE_TEST_LICENSE}~" confluence/confluence-home/confluence.cfg.xml.tmpl > confluence/confluence-home/confluence.cfg.xml -sed "s~INJECT_BASE_IMAGE_HERE~${TEST_TARGET_IMAGE}~" confluence/Dockerfile.tmpl > confluence/Dockerfile diff --git a/func-tests/docker-compose.yml b/func-tests/docker-compose.yml index 83ac0dc..2790465 100644 --- a/func-tests/docker-compose.yml +++ b/func-tests/docker-compose.yml @@ -18,6 +18,8 @@ services: confluence: build: context: ./confluence + args: + - TEST_TARGET_IMAGE=${TEST_TARGET_IMAGE} depends_on: - postgresql ports: