jenkins: prune lfs objects

old-commit-hash: affeb2ef73
taco
Adeeb Shihadeh 3 years ago
parent 28dfaa0abe
commit 7a0bddab89
  1. 4
      selfdrive/test/setup_device_ci.sh

@ -19,6 +19,7 @@ fi
umount /data/safe_staging/merged/ || true umount /data/safe_staging/merged/ || true
sudo umount /data/safe_staging/merged/ || true sudo umount /data/safe_staging/merged/ || true
rm -rf /data/safe_staging/* || true
export KEYS_PARAM_PATH="/data/params/d/GithubSshKeys" export KEYS_PARAM_PATH="/data/params/d/GithubSshKeys"
export KEYS_PATH="/usr/comma/setup_keys" export KEYS_PATH="/usr/comma/setup_keys"
@ -54,7 +55,6 @@ cd $SOURCE_DIR
rm -f .git/index.lock rm -f .git/index.lock
git reset --hard git reset --hard
git fetch
find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \; find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \;
git fetch --verbose origin $GIT_COMMIT git fetch --verbose origin $GIT_COMMIT
git reset --hard $GIT_COMMIT git reset --hard $GIT_COMMIT
@ -63,6 +63,8 @@ git clean -xdf
git submodule update --init --recursive git submodule update --init --recursive
git submodule foreach --recursive "git reset --hard && git clean -xdf" git submodule foreach --recursive "git reset --hard && git clean -xdf"
git lfs prune
echo "git checkout done, t=$SECONDS" echo "git checkout done, t=$SECONDS"
rsync -a --delete $SOURCE_DIR $TEST_DIR rsync -a --delete $SOURCE_DIR $TEST_DIR

Loading…
Cancel
Save