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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.