Save_cache when: always


We’re using Bazel to build on CircleCI 2.0. Bazel uses files in ~/.cache/bazel to figure out how to re-run only the tests depend on modified source code. Therefore, it is useful to save_cache even when the build has failed.

The save_cache step should support when: always, just like the run step.


Use {{ epoch }}


I don’t understand how that will help. In fact, it seems like that will do the opposite of what I want—it will prevent the cache from EVER being restored. I want to save cache even when the build fails.


I apologize- I misunderstood. I’ll open a feature request.


Was this ever implemented?


It was. Sorry for forgetting to update.