Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to configure cache on self hosted runner

Doc says

  • 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

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 06, 2023

Hi @Michał,

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.

Kind regards,

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:

  • Is there away to mount the cache directories to the host of the self-hosted runner?
  • I noticed that every step in the pipeline, the caches are being dowloaded. Is there away to avoid this? For self-hosted runners in our own infra, these cache downloads are causing the build timing longer.
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 11, 2023

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.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events