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
Some checks failed
build-staging Build build-staging has failed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user