Forums

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

How could I share the cached resources to a bitbucket pipe

Bruno Macedo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 12, 2023

Hi there, 
I would like to know if there is a way to share/volume or access the cached resources inside my bitbucket pipe
I do have gradle resources that I wanted to be accessible from my pipe container:


definitions:
caches:
gradlewrapper: ~/.gradle/wrapper
steps:
- step: &download-gradle-wrapper
name: Download Gradle Wrapper to speed up subsequent uses of wrapper
caches:
- docker
- gradle
- gradlewrapper
script:
- ./gradlew
- step: &gradle-build
name: Build artifact with gradle into docker image
caches:
- docker
- gradle
- gradlewrapper
script:
- docker login ....
- pipe: docker://some-docker-image:latest --command build
variables:
SOME_VARIABLE: $SOME_VARIABLE
 

 

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2023

Hi Bruno and welcome to the community!

You can check my reply to the following post that provides details on how to do so:

My answer there is specific to the pip cache, which is located at ~/.cache/pip

The gradle cache is located at ~/.gradle/caches and you have defined gradlewrapper for ~/.gradle/wrapper

So, instead of the .cache directory in the commands I provide, you can use .gradle instead.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events