drm/ci: remove rebase-merge directory
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 2 Dec 2023 22:13:53 +0000 (01:13 +0300)
committerRob Clark <robdclark@chromium.org>
Sun, 10 Dec 2023 19:47:28 +0000 (11:47 -0800)
Gitlab runner can cache git repository, including the unfinished rebase
merge status. New CI job will come as a fresh checkout, however this
will not destroy the unfinished rebase, failing our build script.
Destroy the unfinished rebase state.

Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Helen Koike <helen.koike@collabora.com>
Patchwork: https://patchwork.freedesktop.org/patch/570159/
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/ci/build.sh

index e5c5dcedd1084fbc7fb5f9a59b7566676f756464..ca2923ed22903d583ecd9157b327d57a3e9452df 100644 (file)
@@ -58,6 +58,9 @@ git config --global user.email "fdo@example.com"
 git config --global user.name "freedesktop.org CI"
 git config --global pull.rebase true
 
+# cleanup git state on the worker
+rm -rf .git/rebase-merge
+
 # Try to merge fixes from target repo
 if [ "$(git ls-remote --exit-code --heads ${UPSTREAM_REPO} ${TARGET_BRANCH}-external-fixes)" ]; then
     git pull ${UPSTREAM_REPO} ${TARGET_BRANCH}-external-fixes