From 6f65d77b0a1ff842668cf2306a5fe85a67f6c51c Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 13 Jul 2026 18:33:54 -0400 Subject: [PATCH] auth --- .webhook_bridge/pipeline-build-homepage-staging.yaml | 10 +++++++++- docker/server/Dockerfile | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.webhook_bridge/pipeline-build-homepage-staging.yaml b/.webhook_bridge/pipeline-build-homepage-staging.yaml index 5acb097..bb2f437 100644 --- a/.webhook_bridge/pipeline-build-homepage-staging.yaml +++ b/.webhook_bridge/pipeline-build-homepage-staging.yaml @@ -121,7 +121,7 @@ spec: - name: url value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git - name: revision - value: af22c87d0db59dece97d03e6b6a796d84010158f + value: 7d4b33528fef5f2e662d32d093566ce56eb4acd0 - name: pathInRepo value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml params: @@ -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) + - --secret + - id=cache_token,src=/workspace/nix-cache-creds/CACHE_GET_TOKEN - name: BUILDKITD_TOML value: | debug = true @@ -155,6 +157,8 @@ spec: workspace: git-source - name: dockerconfig workspace: docker-credentials + - name: nix-cache-creds + workspace: nix-cache-creds runAfter: - fetch-repository finally: @@ -219,6 +223,7 @@ spec: workspaces: - name: git-source - name: docker-credentials + - name: nix-cache-creds workspaces: - name: git-source volumeClaimTemplate: @@ -233,6 +238,9 @@ spec: - name: docker-credentials secret: secretName: harbor-plain + - name: nix-cache-creds + secret: + secretName: nix-pull-through-cache params: - name: image-name value: "harbor.fizz.buzz/private/homepage-staging" diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 675a197..5f2de0f 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -10,6 +10,8 @@ filter-syscalls = false substituters = http://ncps.nix-pull-through-cache.svc.cluster.local:80 https://cache.nixos.org 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 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 COPY . /tmp/build