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

[CI] Proper get of image name when image is used multiple times in Docker Compose

parent 39740fb8
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,18 @@ do
;;
esac
done
if [ "$RES" = "" ]; then
echo "Error : no folder starting by pica or meta modified in last commit."
echo "Please check README.md for further understanding."
exit 1;
fi
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 ' ')
RES=$(cat $RES/docker-compose.yml | grep $RES: | cut -d ':' -f2- | cut -d '/' -f2- | tr -d ' ' | head -n 1)
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."
......
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