You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Be aware that we don’t restrict where your cache folder is located, so you can store the cache in any directory of the device. Be mindful about any technical implications of where your cache is defined and make sure your host machine is recoverable.
1. Where is the cache directory located by default
2. How to specify the cache directory location
Pipelines provide pre-defined cache locations for commonly used language tools which also apply to MacOS Runners. You can view the default locations for these tools here:
If you are using a different tool or if you want to use a different location, you can check the section "Custom caches for other build tools and directories" in that link for more details.
Please feel free to let me know if you have any other questions.
Hi @Theodora Boudale ,
Just to clarify. For the pre-define caches like "gradle", cache dir "~/.gradle/caches" is in the container that runs the step's scripts, correct? And since self-hosted runners are using "docker-in-docker", I assume the cache dir (ie. "~/.gradle/caches") is not really mounted by default to the host (ie. MacOS in this case)?
If my assumption is correct, few follow-up questions:
Hi @Efren Jamolod!
Docker containers are used for pipelines builds that run in our own infrastructure and for builds that run in Linux Docker runners. Builds that run in the other type of runners (Linux Shell, MacOS, and Windows Runners) do not use Docker, and the builds run directly in the host machine. MacOS runners use Bash to run pipeline steps on your MacOS machine (host device).
For the last three types of runners I mentioned (Linux Shell, MacOS, and Windows Runners) the cache is saved on the host machine and not in any container, as these runners don't use containers.
The cache will get downloaded for a step that has a caches definition in the bitbucket-pipelines.yml file. If a certain step does not need to use cache and you want to prevent the cache from getting downloaded, you will need to remove the caches definition from this specific step in your bitbucket-pipelines.yml file.