I\'m trying to use \'cache\' in .gitlab-ci.yml (http://doc.gitlab.com/ce/ci/yaml/README.html#cache). My gitlab version is 8.2.1 and my Runner is:
$ docker e
We found out, that is better to cache the whole .gradle
-folder. This should be used only once per project. If k8s used for gitlab-runner, then you should turn the daemon off.
gitlab-ci.yaml
:
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false" # no gradle-daemon on k8s
# ...
buildJar:
stage: build
image: gradle:5.6.4-jdk11
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
script:
- gradle assemble
cache:
key: "gradleCache"
paths:
- .gradle