diff mbox series

drm/ci: remove rebase-merge directory

Message ID 20231202221353.1276288-1-dmitry.baryshkov@linaro.org
State Accepted
Commit 236fa3873de8f1d4b0c7eaeb4c53b4d1220d55a0
Headers show
Series drm/ci: remove rebase-merge directory | expand

Commit Message

Dmitry Baryshkov Dec. 2, 2023, 10:13 p.m. UTC
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>
---
 drivers/gpu/drm/ci/build.sh | 3 +++
 1 file changed, 3 insertions(+)

Comments

Helen Mae Koike Fornazier Dec. 5, 2023, 5:53 p.m. UTC | #1
On 02/12/2023 19:13, Dmitry Baryshkov wrote:
> 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>

Thanks!
Helen

> ---
>   drivers/gpu/drm/ci/build.sh | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
> index e5c5dcedd108..ca2923ed2290 100644
> --- a/drivers/gpu/drm/ci/build.sh
> +++ b/drivers/gpu/drm/ci/build.sh
> @@ -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
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index e5c5dcedd108..ca2923ed2290 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -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