Hi, I added attic
to my CI run, and it’s avoiding rebuilds of the main project nicely.
The commands are:
nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client login myaccount https://attic.example.com ${ATTIC_SECRET}
nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client use myaccount:build
nix build .#mydockeimager
cp result /build/dockerimage
nix run -I nixpkgs=channel:nixos-unstable nixpkgs#attic-client push myaccount:build ./result
(sure, could add attic to env, doesn’t matter much for the question)
This works well. It checks the cache and re-uses any previous build. However, I would like it to cache /everything/ on my attic instance, that’s all the dependencies, and also everything copied from cache.nixos.org. Mostly to be not using so much bandwidth from nixos.org (I find it super impolite to download 100Mb from them every CI run), but also it misses some local derivations this way I think.
Any ideas how to make it push everything needed for the build? attic
has a watch mode, but that doesn’t look useful in CI mode; no way to know when attic is done uploading.
I tried attic cache configure build --upstream-cache-key-name ''
but that didn’t change much. Thoughts?