bitbucket pipelines 筆記
A cache is something that you want to store across multiple pipeline runs.
For example, installed dependencies. The idea is to download the dependencies in a pipeline run, and then reuse those in other runs afterwards (to reduce pipeline time spent downloading).
- A cache needs to be defined in the step that you want to consume the cache in, this step will also create and upload a new cache if it does not exist.
An artifact is something that you want to persist across multiple steps, in a single pipeline run.
For example, if you've built and tested a binary in one step, and you want to have deployment steps afterwards. Then you're deploying the same object that you've already tested (rather than recreating it).
- An artifact needs to be defined on a step that has created the artifact. However, this artifact is propagated to all subsequent steps, without requiring any configuration on the other steps.