| Crates.io | btdt-server |
| lib.rs | btdt-server |
| version | 0.2.0 |
| created_at | 2025-09-15 18:06:09.385418+00 |
| updated_at | 2025-09-15 18:06:09.385418+00 |
| description | Server component for "been there, done that" - a tool for flexible CI caching |
| homepage | |
| repository | https://github.com/jgosmann/btdt |
| max_upload_size | |
| id | 1840432 |
| size | 140,265 |
btdt is a tool for flexible caching files in CI pipelines.
By being a simple CLI program, it is agnostic to the CI platform and can be integrated into various pipelines.
This tool is still under active development and not feature complete yet. See below for details.
node_modulesCACHE_KEY=node-modules-$(btdt hash package-lock.json)
btdt restore --cache path/to/cache --keys $CACHE_KEY node_modules
if [ $? -ne 0 ]; then
npm ci
btdt store --cache path/to/cache --keys $CACHE_KEY node_modules
fi
Examples for specific CI platforms can be found in the documentation (see below).
The main user guide and documentation is located at https://jgosmann.github.io/btdt. The API documentation is found on docs.rs
I was annoyed that there isn't a good (self-hosted) caching solution for Jenkins and Tekton, similar to the cache for GitHub Actions. Also, it seemed that it shouldn't be that hard to implement a caching solution. So I put my money where my mouth is. In particular, I didn't see any reason why caching should be tied to a specific CI platform by implementing it as a plugin for that platform. To me, it seems, that this problem is solvable with a CLI tool that can be integrated into any pipeline.
Regarding Jenkins, I know of two caching plugins and I have my quarrels with both of them:
Regarding Tekton, a few suggestions are made in their blog. But I don't think those are perfect:
btdt provides tooling to have multiple separate caches.A basic version of btdt that can be used in some scenarios is working.
I still intend to implement the following features:
btdt hash doesn't need to be called,
but a cache key in the form of cache-key-${hashFiles('**/package-lock.json')} can be used directly.