You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make parent cache download quiet
This spammed logs quite a bit
* Add "-p" to "mkdir $CI_PROJECT_DIR/cache-artifact"
Otherwise the after_script is silently aborted when the dir already exists.
* Extract parent cache artifact in own directory and later delete it
Otherwise we end up having "testlogs" (and maybe other stuff) in the
project directory, which causes future failures.
Copy file name to clipboardExpand all lines: .gitlab-ci.yml
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -33,13 +33,17 @@ stages:
33
33
if [ "$CI_COMMIT_REF_SLUG" != "develop" -a "$CI_COMMIT_TAG" == "" ]; then
34
34
if [ ! -d $CACHE_DIR/ccache ]; then
35
35
echo "Downloading cache from develop branch"
36
-
if wget -O cache-artifact.zip https://gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/-/jobs/artifacts/develop/download?job=$CI_JOB_NAME; then
37
-
unzip cache-artifact.zip
36
+
mkdir cache-artifact
37
+
cd cache-artifact
38
+
if wget --quiet -O cache-artifact.zip https://gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/-/jobs/artifacts/develop/download?job=$CI_JOB_NAME; then
39
+
unzip -q cache-artifact.zip
38
40
rm cache-artifact.zip
39
41
mv cache-artifact/* $CACHE_DIR/
40
42
else
41
43
echo "Failed to download cache"
42
44
fi
45
+
cd ..
46
+
rm -rf cache-artifact
43
47
else
44
48
echo "Not touching cache (was initialized from previous build)"
45
49
fi
@@ -97,7 +101,7 @@ stages:
97
101
after_script:
98
102
# Copy all cache files into cache-artifact so that they get uploaded. We only do this for develop so that artifacts
99
103
# stay minimal for PRs and branches (we never need them)
0 commit comments