From 45f538637891161cc982c217daa7118c7d2efd69 Mon Sep 17 00:00:00 2001 From: Igor Witz <igor.witz@etu.utc.fr> Date: Mon, 13 May 2019 18:38:00 +0200 Subject: [PATCH] fix: get modified image in merge requests --- get-modified-image.sh | 2 +- pica-ci/Dockerfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/get-modified-image.sh b/get-modified-image.sh index 7ad6f52e..6d13e044 100755 --- a/get-modified-image.sh +++ b/get-modified-image.sh @@ -4,7 +4,7 @@ # this script should become obsolete as soon as a proper way of getting the modified files is added to Gitlab CI RES="" -for i in $(git log -m -1 --name-only --pretty="format:" $CI_COMMIT_SHA) +for i in $(git log -m -1 --name-only --pretty="format:" --first-parent) do case "$i" in *pica*) RES=$(echo $i | cut -d '/' -f1);; diff --git a/pica-ci/Dockerfile b/pica-ci/Dockerfile index f3dde1ff..97928e0a 100644 --- a/pica-ci/Dockerfile +++ b/pica-ci/Dockerfile @@ -13,7 +13,6 @@ RUN apk update && \ sed \ wget && \ pip install docker-compose && \ - export CI_COMMIT_SHA=$(git rev-parse HEAD) && \ chmod +x get-modified-image.sh get-host-by-image.sh && \ export MODIFIED_IMAGE_FULL=$(./get-modified-image.sh) && \ export MODIFIED_IMAGE=$(echo $MODIFIED_IMAGE_FULL | cut -d ':' -f1) && \ -- GitLab