Pipeline Caching
About 219 wordsLess than 1 minute
During pipeline execution, there are often many dependencies or intermediate artifacts. Caching these dependencies or intermediate artifacts for use in subsequent pipelines can significantly reduce build time and improve efficiency.
Runner Node Caching
Pipelines run on multiple runner nodes in the cloud platform. To balance single point of failure issues and cache hit rates, by default each repository's pipelines are assigned to run on 3 fixed nodes. (The number of nodes may dynamically increase based on repository pipeline resource usage)
Tips
The "fixed 3 nodes" is relative - as the cloud platform scales nodes up or down, pipelines may be assigned to a different set of 3 nodes.
Code Caching
When a pipeline executes, it automatically pulls code files to the runner node and also caches the code on the node for use by subsequent pipelines.
File Caching
During builds, files like project dependencies
and build caches
can be cached on the runner node for use by subsequent pipelines.
Configuration reference: pipeline.runner.volumes
Tips
Dependencies leverage OverlayFS
instant copy technology to enable high-concurrency cache reuse.
Cross-Node Caching
To enable all runner nodes to use the same cache, you can build Docker cache images containing the content to be cached.
Specific methods reference the built-in task: docker:cache