diff mbox series

[PATHv11,40/43] .azure-pipelines: init submodules

Message ID 20231127125726.3735-41-maxim.uvarov@linaro.org
State New
Headers show
Series net/lwip: add lwip library for the network stack | expand

Commit Message

Maxim Uvarov Nov. 27, 2023, 12:57 p.m. UTC
Azure CI does make testconfig then passes U-Boot sources
to docker image. Inside docker image owner of U-Boot files
is different, so user doesn't have permissions to update
submodules. In this case we can do init before we run
test docker image.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 .azure-pipelines.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index d6f3fa423c..b6fa843e8c 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -113,6 +113,7 @@  stages:
     steps:
       - script: |
           cat << "EOF" > build.sh
+          set -x
           cd $(work_dir)
           git config --global user.name "Azure Pipelines"
           git config --global user.email bmeng.cn@gmail.com
@@ -134,6 +135,7 @@  stages:
           make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
           EOF
           cat build.sh
+          make initsubmodules
           # We cannot use "container" like other jobs above, as buildman
           # seems to hang forever with pre-configured "container" environment
           docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
@@ -196,7 +198,9 @@  stages:
           set -ex
           # the below corresponds to .gitlab-ci.yml "before_script"
           cd \${WORK_DIR}
-          git config --global --add safe.directory \${WORK_DIR}
+          git clone \${WORK_DIR} /tmp/u-boot.git
+          WORK_DIR="/tmp/u-boot.git"
+          cd \${WORK_DIR}
           git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
           ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\`
           ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\`
@@ -506,7 +510,9 @@  stages:
           cd ${WORK_DIR}
           # make environment variables available as tests are running inside a container
           export BUILDMAN="${BUILDMAN}"
-          git config --global --add safe.directory ${WORK_DIR}
+          git clone ${WORK_DIR} /tmp/u-boot.git
+          WORK_DIR="/tmp/u-boot.git"
+          cd \${WORK_DIR}
           pip install -r tools/buildman/requirements.txt
           EOF
           cat << "EOF" >> build.sh