Compare commits
2 Commits
d41407eb70
...
145494b8aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
145494b8aa
|
||
|
|
6f65d77b0a
|
@@ -144,7 +144,6 @@ spec:
|
|||||||
- 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)
|
||||||
- --secret
|
- --secret
|
||||||
- id=cache_token,src=/workspace/nix-cache-creds/CACHE_GET_TOKEN
|
- id=cache_token,src=/workspace/nix-cache-creds/CACHE_GET_TOKEN
|
||||||
# - id=cache_token,env=MY_ENV_TOKEN
|
|
||||||
- name: BUILDKITD_TOML
|
- name: BUILDKITD_TOML
|
||||||
value: |
|
value: |
|
||||||
debug = true
|
debug = true
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ filter-syscalls = false
|
|||||||
substituters = http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org
|
substituters = http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN --mount=type=secret,id=cache_token echo "extra-access-tokens = ncps.nix-pull-through-cache.svc.cluster.local=$(cat /run/secrets/cache_token)" >> /etc/nix/nix.conf
|
RUN --mount=type=secret,id=cache_token echo "extra-access-tokens = ncps.nix-pull-through-cache.svc.cluster.local=PAT:$(cat /run/secrets/cache_token)" >> /etc/nix/nix.conf
|
||||||
|
|
||||||
RUN --mount=type=secret,id=cache_token NIX_CONFIG="extra-access-tokens = ncps.nix-pull-through-cache.svc.cluster.local=$(cat /run/secrets/cache_token)" cp "$(nix build nixpkgs#cacert --print-out-paths)/etc/ssl/certs/ca-bundle.crt" /tmp/ca-bundle.crt
|
RUN --mount=type=secret,id=cache_token NIX_CONFIG="extra-access-tokens = ncps.nix-pull-through-cache.svc.cluster.local=PAT:$(cat /run/secrets/cache_token)" cp "$(nix build nixpkgs#cacert --print-out-paths)/etc/ssl/certs/ca-bundle.crt" /tmp/ca-bundle.crt
|
||||||
|
|
||||||
COPY . /tmp/build
|
COPY . /tmp/build
|
||||||
WORKDIR /tmp/build
|
WORKDIR /tmp/build
|
||||||
|
|
||||||
RUN --mount=type=secret,id=cache_token NIX_CONFIG="extra-access-tokens = ncps.nix-pull-through-cache.svc.cluster.local=$(cat /run/secrets/cache_token)" nix build '.#docker_env'
|
RUN --mount=type=secret,id=cache_token NIX_CONFIG="extra-access-tokens = ncps.nix-pull-through-cache.svc.cluster.local=PAT:$(cat /run/secrets/cache_token)" nix build '.#docker_env'
|
||||||
|
|
||||||
# Export the built closure to a folder
|
# Export the built closure to a folder
|
||||||
RUN mkdir /tmp/nix-store-closure
|
RUN mkdir /tmp/nix-store-closure
|
||||||
|
|||||||
Reference in New Issue
Block a user