I am setting up a gradle cache to enable faster builds. It seems (they are listed under caches as well) the cache is stored, but I really can't find the restored cache when running subsequent steps.
How can this be? The build setup outputs even says it downloads the cache and unpacks it.
My setup is something like this:
pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- gradle
- gradlewrapper
script:
- export TESTCONTAINERS_RYUK_DISABLED=true
- ls -lah
- ./gradlew --build-cache --no-daemon stage
services:
- docker
after-script:
- pipe: atlassian/checkstyle-report:0.2.0
- step:
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.4.3
- step:
name: Build and publish docker image
size: 2x
caches:
- docker
- gradle
- gradlewrapper
script:
- *docker_build_variables_anchor
- ls -lah .
- docker build -t $IMAGE_NAME .
- docker tag $IMAGE_NAME $IMAGE:master
- docker push $IMAGE_NAME
- docker push $IMAGE:master
services:
- docker
definitions:
caches:
gradlewrapper: ~/.gradle/wrapper
The "ls -lah ." steps above shows no ".gradle" folder on the paths. Even though the build setup for each steps says this:
<span><br>Cache "docker": Downloaded 623.7 MiB in 7 seconds</span>
<span>Cache "docker": Extracting</span><span>Cache "docker": Extracted in 7 seconds</span><span><br>Cache "gradle": Downloading<br></span><span>Cache "gradle": Downloaded 190.9 MiB in 2 seconds</span>
<span>Cache "gradle": Extracting<br></span><span>Cache "gradle": Extracted in 2 seconds<br></span><span>Cache "gradlewrapper": Downloading<br></span><span>Cache "gradlewrapper": Downloaded 196.1 MiB in 3 seconds</span><span><br>Cache "gradlewrapper": Extracting</span><span><br>Cache "gradlewrapper": Extracted in 1 seconds</span><span>Cache "docker": Downloading</span>
Am I misundestanding where the folders should end up? Thanks...