From 7335bbd16b14b597e5a97c9b4616b865fa91f527 Mon Sep 17 00:00:00 2001 From: Quentin Duchemin <quentinduchemin@tuta.io> Date: Wed, 22 Apr 2020 15:36:17 +0200 Subject: [PATCH] [CI] More informative error messages in get-modified-image.sh --- get-modified-image.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/get-modified-image.sh b/get-modified-image.sh index 714b2fed..23bf3d3e 100755 --- a/get-modified-image.sh +++ b/get-modified-image.sh @@ -15,12 +15,15 @@ do esac done echo "export MODIFIED_IMAGE=${RES}" > variables +echo "Using modified folder : $RES" # Image name with wanted registry and tag, fetched from Docker Compose RES=$(cat $RES/docker-compose.yml | grep $RES: | cut -d ':' -f2- | cut -d '/' -f2- | tr -d ' ') -if [ "$RES" = "" ]; then exit 1; fi +if [ "$RES" = "" ]; then + echo "Error : no reference to $RES found in docker-compose.yml." + echo "Please check the repository README : the name of the folder must be the same as name of the image." + exit 1 +fi echo "export MODIFIED_IMAGE_FULL_TEST=registry.test.picasoft.net/${RES}" >> variables echo "export MODIFIED_IMAGE_FULL=registry.picasoft.net/${RES}" >> variables - -echo "Found modified folder : $RES" -- GitLab