[PATHv11 43/43] .gitlab-ci.yml: change ownership of the git files

Maxim Uvarov maxim.uvarov at linaro.org
Mon Nov 27 13:57:26 CET 2023


Inside docker image owner of U-Boot files
is different, so user doesn't have permissions to update
submodules. Make the ower of git the same as current user.

Signed-off-by: Maxim Uvarov <maxim.uvarov at linaro.org>
---
 .gitlab-ci.yml | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fee165198a..cb4f00e978 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -104,7 +104,8 @@ build all 32bit ARM platforms:
   extends: .world_build
   script:
     - ret=0;
-      git config --global --add safe.directory "${CI_PROJECT_DIR}";
+      git clone `pwd` /tmp/u-boot.git;
+      cd /tmp/u-boot.git;
       pip install -r tools/buildman/requirements.txt;
       ./tools/buildman/buildman -o /tmp -PEWM arm -x aarch64 || ret=$?;
       if [[ $ret -ne 0 ]]; then
@@ -118,7 +119,8 @@ build all 64bit ARM platforms:
     - virtualenv -p /usr/bin/python3 /tmp/venv
     - . /tmp/venv/bin/activate
     - ret=0;
-      git config --global --add safe.directory "${CI_PROJECT_DIR}";
+      git clone `pwd` /tmp/u-boot.git;
+      cd /tmp/u-boot.git;
       pip install -r tools/buildman/requirements.txt;
       ./tools/buildman/buildman -o /tmp -PEWM aarch64 || ret=$?;
       if [[ $ret -ne 0 ]]; then
@@ -130,7 +132,8 @@ build all PowerPC platforms:
   extends: .world_build
   script:
     - ret=0;
-      git config --global --add safe.directory "${CI_PROJECT_DIR}";
+      git clone `pwd` /tmp/u-boot.git;
+      cd /tmp/u-boot.git;
       ./tools/buildman/buildman -o /tmp -P -E -W powerpc || ret=$?;
       if [[ $ret -ne 0 ]]; then
         ./tools/buildman/buildman -o /tmp -seP;
@@ -141,7 +144,8 @@ build all other platforms:
   extends: .world_build
   script:
     - ret=0;
-      git config --global --add safe.directory "${CI_PROJECT_DIR}";
+      git clone `pwd` /tmp/u-boot.git;
+      cd /tmp/u-boot.git;
       ./tools/buildman/buildman -o /tmp -PEWM -x arm,powerpc || ret=$?;
       if [[ $ret -ne 0 ]]; then
         ./tools/buildman/buildman -o /tmp -seP;
@@ -192,7 +196,8 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
   script:
     - git config --global user.name "GitLab CI Runner";
       git config --global user.email trini at konsulko.com;
-      git config --global --add safe.directory "${CI_PROJECT_DIR}";
+      git clone `pwd` /tmp/u-boot.git;
+      cd /tmp/u-boot.git;
       export USER=gitlab;
       virtualenv -p /usr/bin/python3 /tmp/venv;
       . /tmp/venv/bin/activate;
-- 
2.30.2



More information about the U-Boot mailing list