zhaofengli/attic

pulling artifacts in docker right after build fails

Opened this issue · 0 comments

Hi,

I was integrating a docker-based CI with attic cache and noticed very unpleasant bug.
I guess it related to nix-store, but I would like to mention problem here because of context (I haven't used nix-store until I encountered attic).
The error message is pretty broad and is not active.

default attic case inside a Dockerfile:

RUN attic login local $atticurl $attickey
RUN attic use mycache
RUN nix-build 
RUN attic push mycache $(realink ./result)
RUN nix-store --store $PWD/copy -r $(realink ./result)

Last line from the snippet above fails with:

 nix-store -r /nix/store/j5z4d64397y54avpc23klgj2pw94gim4-hs-util-0.1.0.0
don't know how to build these paths:
  /nix/store/j5z4d64397y54avpc23klgj2pw94gim4-hs-util-0.1.0.0
error: build of '/nix/store/j5z4d64397y54avpc23klgj2pw94gim4-hs-util-0.1.0.0' failed

Workaround I found is:

rm ~/.cache/nix

nix-build --version
nix-build (Nix) 2.20.8