diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-02-14 11:30:15 +0100 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-02-14 11:30:15 +0100 |
commit | 6be5eb6fb873efdd10e6e4690ecfcd443541bf19 (patch) | |
tree | 853132f855b6fdd73229309cb8c0fa0cc1553438 | |
parent | 4f39ab1785ec356cab4ec1db7a7f3bb78c43b570 (diff) |
Avoid race condition on .gitconfig.lock
on parallel builds on the same host.
This avoids:
error: could not lock config file /home/jenkins/.gitconfig: File exists
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: Ib3f0b3cec91d87f0170c92c6781df67e2e7c75af
-rw-r--r-- | jjb/common/include-agl-header.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jjb/common/include-agl-header.sh b/jjb/common/include-agl-header.sh index 2dbf9269..6e118837 100644 --- a/jjb/common/include-agl-header.sh +++ b/jjb/common/include-agl-header.sh @@ -165,6 +165,9 @@ set | grep ^GERRIT || true set | grep ^MACHINE || true #fi +# to avoid .gitconfig.lock race condition do +sleep $((1 + RANDOM % 10)) + if test ! -f ~/.gitconfig ; then git config --global user.email "jenkins-dontreply@build.automotivelinux.org" git config --global user.name "jenkins-dontreply@build.automotivelinux.org" |