Hi,
I read the doc about caching https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html but I can't find the information I need.
Is the default cache global or do we need to specify a cache in each step?
I would like to avoid something like this:
pipelines:
default:
- step:
name: Build phase
caches:
- maven
script:
- mvn -B clean compile
- step:
name: Test phase
caches:
- maven
script:
- mvn -B clean verify
Thanks a lot
Hello Attoumane,
The cache is global across the entirely repository. However, for it to be used you need to specify the cache in the step definition. So you will need the bitbucket-pipelines.yml configuration you have in your question.
Note that the Maven cache only caches dependencies. So it won't carry over the compiled files from your first step into your second step. I suggest you instead combine the two steps into one.
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.