From 79afa759ff85e8a99bea705aa2da957dfb7ccdf8 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin <quentinduchemin@tuta.io> Date: Thu, 30 Jan 2020 17:39:25 +0100 Subject: [PATCH] [CI] Rewrite URLs before pulling in testing script --- docker_test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker_test.sh b/docker_test.sh index baf0526b..f37c4f2c 100755 --- a/docker_test.sh +++ b/docker_test.sh @@ -48,6 +48,12 @@ else exit 0 fi +echo -e "\n==== Replace production URL with testing URL in all files ====" +for f in $(grep -l -r ".picasoft.net" .); do + echo -e "\tFound in" ${f} + sed -i "s/.picasoft.net/.test.picasoft.net/g" ${f} +done + echo -e "\n==== Remove and re-create named external volumes ====" for v in $(docker-compose config --volumes); do # Don't fail if volume does not exists @@ -60,12 +66,6 @@ echo -e "\n==== Pull new versions of images ====" docker-compose config | grep "image:" | cut -d ':' -f 2- | xargs docker image rm || true docker-compose pull -echo -e "\n==== Replace production URL with testing URL in all files ====" -for f in $(grep -l -r ".picasoft.net" .); do - echo -e "\tFound in" ${f} - sed -i "s/.picasoft.net/.test.picasoft.net/g" ${f} -done - echo -e "\n==== Lauch $1 and restore repository ====" docker-compose up -d git reset --hard -- GitLab