I started using pipeline caches which is brilliant when my branches are similar, in particular a docker cache where the docker layer's building blocks are the same.
I am looking for something like an alias, maybe something like this :
```
caches:
- docker: 'staging.docker.tar'
```
Or something a little bit more automated that takes into account the branch name when creating the cache.
Hi @Decebal Dobrica,
you might want to take a look a custom pages: https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html (see the 'Custom caches for other build tools and directories' section).
This allows you to define custom caches. You could then combine this with different pipelines for specific branches that use your custom caches.
So this could look something like this:
pipelines:
branches:
some-branch:
- step:
caches:
- my-custom-cache1
...
other-branch:
- step:
caches:
- my-custom-cache2definitions: caches: my-custom-cache1: custom/cache/1
my-custom-cache2: custom/cache/2
Hi @Jeroen De Raedt,
Thanks for you reply.
I was aware of custom caches, but not sure exactly how I could use them with docker.
Could you help me understand how I can create a custom cache using a pre-defined cache like docker.
Unlike other dependency caches such as `node_modules` for nodejs as example, docker cache should work quite differently, in the sense that the cache is built from layers by attlasian as I found it described here: https://confluence.atlassian.com/bitbucket/run-docker-commands-in-bitbucket-pipelines-879254331.html#RunDockercommandsinBitbucketPipelines-ci_caching.
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.