Skip to content
Snippets Groups Projects
Verified Commit 79afa759 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[CI] Rewrite URLs before pulling in testing script

parent 1f755dd5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment