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.
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
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