* [PATCH] CI: Make more use of git safe.directory
@ 2022-11-21 17:52 Tom Rini
2022-11-21 22:51 ` Simon Glass
2022-11-24 21:33 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2022-11-21 17:52 UTC (permalink / raw)
To: u-boot
We have a number of jobs that will have git complain about needing to
set safe.directory and this being untrue as a fatal error, but then
complete. Set this flag correctly now as it should be used, and may
prevent a future failure.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
.azure-pipelines.yml | 2 ++
.gitlab-ci.yml | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 4928d3abac7d..80b0b2c5d003 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -362,6 +362,7 @@ stages:
cat << "EOF" >> test.sh
# the below corresponds to .gitlab-ci.yml "before_script"
cd ${WORK_DIR}
+ git config --global --add safe.directory ${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`
@@ -551,6 +552,7 @@ stages:
export BUILDMAN="${BUILDMAN}"
EOF
cat << "EOF" >> build.sh
+ git config --global --add safe.directory ${WORK_DIR}
if [[ "${BUILDMAN}" != "" ]]; then
ret=0;
tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 36a274dac52f..dbb8990af50c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,6 +14,7 @@ stages:
stage: test.py
before_script:
# Clone uboot-test-hooks
+ - git config --global --add safe.directory "${CI_PROJECT_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`
@@ -81,6 +82,7 @@ build all 32bit ARM platforms:
stage: world build
script:
- ret=0;
+ git config --global --add safe.directory "${CI_PROJECT_DIR}";
./tools/buildman/buildman -o /tmp -P -E -W arm -x aarch64 || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
@@ -93,6 +95,7 @@ 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}";
./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
@@ -103,6 +106,7 @@ build all PowerPC platforms:
stage: world build
script:
- ret=0;
+ git config --global --add safe.directory "${CI_PROJECT_DIR}";
./tools/buildman/buildman -o /tmp -P -E -W powerpc || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
@@ -113,6 +117,7 @@ build all other platforms:
stage: world build
script:
- ret=0;
+ git config --global --add safe.directory "${CI_PROJECT_DIR}";
./tools/buildman/buildman -o /tmp -P -E -W -x arm,powerpc || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] CI: Make more use of git safe.directory
2022-11-21 17:52 [PATCH] CI: Make more use of git safe.directory Tom Rini
@ 2022-11-21 22:51 ` Simon Glass
2022-11-24 21:33 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-11-21 22:51 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot
On Mon, 21 Nov 2022 at 10:52, Tom Rini <trini@konsulko.com> wrote:
>
> We have a number of jobs that will have git complain about needing to
> set safe.directory and this being untrue as a fatal error, but then
> complete. Set this flag correctly now as it should be used, and may
> prevent a future failure.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> .azure-pipelines.yml | 2 ++
> .gitlab-ci.yml | 5 +++++
> 2 files changed, 7 insertions(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] CI: Make more use of git safe.directory
2022-11-21 17:52 [PATCH] CI: Make more use of git safe.directory Tom Rini
2022-11-21 22:51 ` Simon Glass
@ 2022-11-24 21:33 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-11-24 21:33 UTC (permalink / raw)
To: u-boot
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
On Mon, Nov 21, 2022 at 12:52:40PM -0500, Tom Rini wrote:
> We have a number of jobs that will have git complain about needing to
> set safe.directory and this being untrue as a fatal error, but then
> complete. Set this flag correctly now as it should be used, and may
> prevent a future failure.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-24 21:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 17:52 [PATCH] CI: Make more use of git safe.directory Tom Rini
2022-11-21 22:51 ` Simon Glass
2022-11-24 21:33 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.