jenkins: rm everything except git dir (#21658)

old-commit-hash: 507cfc8910
This commit is contained in:
Adeeb Shihadeh 2021-07-19 14:44:16 -07:00 committed by GitHub
parent 924f76e835
commit af1e998ba6
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ fi
# set up environment
cd $SOURCE_DIR
git reset --hard
git fetch
find . -maxdepth 1 -not -path './.git' -not -name '.' -not -name '..' -exec rm -rf '{}' \;
git fetch --verbose origin $GIT_COMMIT
git reset --hard $GIT_COMMIT
git checkout $GIT_COMMIT