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:
name: Build phase
- mvn -B clean compile
name: Test phase
- mvn -B clean verify
Thanks a lot
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.
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events