Pipeline caches

Summary of the feature request or feedback

Pipelines would benefit from cache per workflow-&-branch instead of just per branch - or - some other mechanism where the cache would not get overridden but instead combined.

Details of the use-case

Bitrise currently has a single cache per branch. This means when using pipelines, the last workflow to call cache-push will overwrite all the other workflow’s cached files. This results in cache misses for all other workflows, severely limiting the benefit of build caching for pipelines.

As an example on Android, we may have a pipeline that has split automated Espresso tests into its own workflow so that they are executed in parallel. workflow_a would like to cache things like .gradle/ for all the flavours & their dependencies whilst workflow_b would like to cache just the test flavour & dependencies along with things like Android or Firebase emulators. As workflow_b is the longer running workflow, its cache overrides everything. Thus on subsequent builds, workflow_a now results in some cache misses and has to re-download the missing dependencies as well as re-build the Gradle tasks that workflow_b didn’t cache (because it never ran them).

2 Likes

Hey @joshuaongps
thanks for the feedback.

The team just delivered something that may help with your use case.

Key-value caching beta
We’ve released new cache Steps that support more complex caching logics.
With them, you can specify keys for each cache, and the cache will not have a branch, workflow, or stack restrictions.

The Steps

Bit more about it key-value caching

Here you can find some workflow recipes

Are there any plans to have the key-value caches appear under Manage build caches in App Settings > Builds?