ci: fix jenkins checkout (#34025)

fix
This commit is contained in:
Maxime Desroches 2024-11-14 11:35:14 -08:00 committed by GitHub
parent dc73e6e2aa
commit 233dc24929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 3 deletions

View File

@ -86,7 +86,7 @@ safe_checkout() {
rsync -a --delete $SOURCE_DIR $TEST_DIR
}
unsafe_checkout() {
unsafe_checkout() {( set -e
# checkout directly in test dir, leave old build products
cd $TEST_DIR
@ -105,7 +105,7 @@ unsafe_checkout() {
git lfs pull
(ulimit -n 65535 && git lfs prune)
}
)}
export GIT_PACK_THREADS=8
@ -116,7 +116,12 @@ fi
if [ ! -z "$UNSAFE" ]; then
echo "trying unsafe checkout"
unsafe_checkout || safe_checkout
set +e
unsafe_checkout
if [[ "$?" -ne 0 ]]; then
safe_checkout
fi
set -e
else
echo "doing safe checkout"
safe_checkout