Skip to content
Snippets Groups Projects
Commit b50667f6 authored by Dmitry Rodionov's avatar Dmitry Rodionov Committed by Yaroslav Dynnikov
Browse files

chore: make it possible to run clean builds without cache

(cherry picked from commit e1b0d398)
parent ed3702ef
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,8 @@ variables:
CACHE_ARCHIVE: /shared-storage/picodata/cache-23.12.tar
# Helps to tolerate spurious network failures
GET_SOURCES_ATTEMPTS: 3
NO_CACHE:
description: "Do not use cache during build phase"
# job:rules explained:
#
......@@ -123,7 +125,9 @@ build-base-image:
# Gitlab CI caching is shit. So we implement it manually
- |
# Restore cache
if [ "$CI_COMMIT_BRANCH" == "$MAIN_BRANCH" ]; then
if [[ -n "$NO_CACHE" ]]; then
echo "Skipping restoring from cache because NO_CACHE is set"
elif [ "$CI_COMMIT_BRANCH" == "$MAIN_BRANCH" ]; then
echo "Skip restoring cache on the master branch"
elif git diff origin/"$MAIN_BRANCH" "$CI_COMMIT_SHA" --submodule=short | grep '^[+-]Subproject commit'; then
echo "Skip restoring cache because submodule(s) changed"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment