Skip to contentSkip to conversation

drm/ci: remove rebase-merge directory

PATCH In review Dmitry Baryshkov 2 participants 2 messages Dec 2, 2023 – Dec 5, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ci: remove rebase-merge directory

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.

---
 drivers/gpu/drm/ci/build.sh | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/ci/build.sh +3 -0
index e5c5dcedd108..ca2923ed2290 100644
@@ -58,6 +58,9 @@ git config --global user.email "[email protected]"
 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
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Dmitry Baryshkov

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.

Thanks!
Helen

Quoted 18 lines
---
  drivers/gpu/drm/ci/build.sh | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/ci/build.sh +3 -0
index e5c5dcedd108..ca2923ed2290 100644
@@ -58,6 +58,9 @@ git config --global user.email "[email protected]"
  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