build: clean up build caches from bundle and go steps

This commit is contained in:
Sameer Naik
2020-05-03 10:23:42 +05:30
parent 4a784bbb93
commit 452062d9fe
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