gitlab-ci: Fix GitHub push ref conflict in trigger_snap_builds
At present GitLab CI fails in the trigger_snap_builds stage with ref-locking errors like: "cannot lock ref 'refs/remotes/origin/ci/cherry-3bfd12008be': 'refs/remotes/origin/ci' exists" This occurs because git fetch commands download all remote branches, including conflicting refs where both 'ci' and 'ci/cherry-*' branches exist, creating filesystem conflicts. Remove the unnecessary git fetch commands and only push only the master branch directly to GitHub, avoiding the ref conflict entirely. Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -970,7 +970,5 @@ trigger_snap_builds:
|
||||
git config --global --add safe.directory $CI_PROJECT_DIR
|
||||
cd $CI_PROJECT_DIR
|
||||
git remote add github git@github.com:sjg20/u-boot-concept.git || true
|
||||
git fetch github master --depth=1
|
||||
git fetch origin "--shallow-since=$(git log -1 --format=%ci github/master)"
|
||||
git push github HEAD:master --force
|
||||
echo "GitHub push completed"
|
||||
|
||||
Reference in New Issue
Block a user