Pass substituters in so local builds aren't trying to hit the in-kubernetes cache.
Some checks failed
build-staging Build build-staging has failed

This commit is contained in:
Tom Alexander
2026-07-16 17:45:15 -04:00
parent 810aacf597
commit 9240bf2692
2 changed files with 5 additions and 3 deletions

View File

@@ -142,6 +142,8 @@ spec:
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
- --opt
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
- --opt
- build-arg:NIX_SUBSTITUTERS="http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org"
- name: BUILDKITD_TOML
value: |
debug = true

View File

@@ -2,15 +2,15 @@
#
# Builder
#
ARG NIX_SUBSTITUTERS="https://cache.nixos.org"
FROM nixos/nix:2.31.3 AS builder
ARG NIX_SUBSTITUTERS
RUN tee -a /etc/nix/nix.conf <<EOF
extra-experimental-features = nix-command flakes
filter-syscalls = false
substituters = http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org
download-attempts = 1
connect-timeout = 3
substituters = $NIX_SUBSTITUTERS
EOF
RUN cp "$(nix build nixpkgs#cacert --print-out-paths)/etc/ssl/certs/ca-bundle.crt" /tmp/ca-bundle.crt