Merge pull request #2133 from sameersbn/clean-up

build: clean up build caches from `bundle` and `go` steps
This commit is contained in:
Sameer Naik 2020-05-03 18:26:51 +05:30 committed by GitHub
commit e63965ecc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
*.gem
*.tar.gz
*.tar.bz2

View File

@ -64,7 +64,6 @@ exec_as_git git config --global gc.auto 0
exec_as_git git config --global repack.writeBitmaps true
exec_as_git git config --global receive.advertisePushOptions true
# shallow clone gitlab-foss
echo "Cloning gitlab-foss v.${GITLAB_VERSION}..."
exec_as_git git clone -q -b v${GITLAB_VERSION} --depth 1 ${GITLAB_CLONE_URL} ${GITLAB_INSTALL_DIR}
@ -156,6 +155,7 @@ cd ${GITLAB_INSTALL_DIR}
# install gems, use local cache if available
if [[ -d ${GEM_CACHE_DIR} ]]; then
echo "Found local npm package cache..."
mv ${GEM_CACHE_DIR} ${GITLAB_INSTALL_DIR}/vendor/cache
chown -R ${GITLAB_USER}: ${GITLAB_INSTALL_DIR}/vendor/cache
fi
@ -426,4 +426,4 @@ DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove ${BUILD_DEPENDENCI
rm -rf /var/lib/apt/lists/*
# clean up caches
exec_as_git rm -rf ${GITLAB_HOME}/.cache
rm -rf ${GITLAB_HOME}/.cache ${GITLAB_HOME}/.bundle ${GITLAB_HOME}/go