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"
|
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
||||||
- --opt
|
- --opt
|
||||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
- 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
|
- name: BUILDKITD_TOML
|
||||||
value: |
|
value: |
|
||||||
debug = true
|
debug = true
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
#
|
#
|
||||||
# Builder
|
# Builder
|
||||||
#
|
#
|
||||||
|
ARG NIX_SUBSTITUTERS=https://cache.nixos.org
|
||||||
|
|
||||||
FROM nixos/nix:2.31.3 AS builder
|
FROM nixos/nix:2.31.3 AS builder
|
||||||
|
|
||||||
|
ARG NIX_SUBSTITUTERS
|
||||||
RUN tee -a /etc/nix/nix.conf <<EOF
|
RUN tee -a /etc/nix/nix.conf <<EOF
|
||||||
extra-experimental-features = nix-command flakes
|
extra-experimental-features = nix-command flakes
|
||||||
filter-syscalls = false
|
filter-syscalls = false
|
||||||
substituters = http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org
|
substituters = $NIX_SUBSTITUTERS
|
||||||
download-attempts = 1
|
|
||||||
connect-timeout = 3
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN cp "$(nix build nixpkgs#cacert --print-out-paths)/etc/ssl/certs/ca-bundle.crt" /tmp/ca-bundle.crt
|
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