The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Git clone via script using cache?

Paul Moors
January 24, 2025

Working with cached repositories on the agents works fine with the Source Code Checkout task in Bamboo. Now I'm wondering, when using a bamboo script-task, on how use these caches when doing a git clone command.

I noticed that git clone ${bamboo.planRepository.1.repositoryUrl} is working fine, but is the cache being used in that case?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 27, 2025

Hello Paul,

Welcome to Atlassian Community.

I don't think so if you run git clone via a script task it will use the cache.

A simple GIT clone command won't know the path where caches are stored. As the cache folder name is created based on the URL and some other combination. Source code checkout task is designed to look for the cache in the particular folder which a simple git clone command won't be. 

You can probably refer this https://randyfay.com/content/reference-cache-repositories-speed-clones-git-clone-reference

Regards,

Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

TAGS
AUG Leaders

Atlassian Community Events