fix(blog-ci): create checkout directories as the build user

Start CDN containers at the shared volume root and enter the checkout from their scripts, avoiding root-owned directories created before clone-source runs.
This commit is contained in:
dahyeon committed 2026-11-18 22:04:51 +09:00
1 parent ccf2190592
commit 4336d923aa
2 files changed
+10 -2

No files matched your search

+5 -2
View File
@@ -258,7 +258,8 @@ spec:
test "$(git -C /workspace/build/source rev-parse HEAD)" = "$REVISION"
- name: prepare-cdn
image: docker.io/library/node:26.7.0-trixie-slim@sha256:5758d367d7b4f48b73a9bb3530e687e47efb289f3b43f9c0450a25225ae0db5d
workingDir: /workspace/build/source
# The checkout must be created by clone-source as UID 1000, not by container startup.
workingDir: /workspace/build
computeResources:
requests:
cpu: 100m
@@ -282,6 +283,7 @@ spec:
script: |
#!/bin/sh
set -eu
cd /workspace/build/source
npm ci --prefix tools/cdn --ignore-scripts --no-audit --no-fund
npm test --prefix tools/cdn
node tools/cdn/cli.mjs check-config --release-result /workspace/build/release-id
@@ -387,7 +389,7 @@ spec:
printf '%s' "$DIGEST" >"$DIGEST_RESULT_PATH"
- name: publish-cdn
image: docker.io/library/node:26.7.0-trixie-slim@sha256:5758d367d7b4f48b73a9bb3530e687e47efb289f3b43f9c0450a25225ae0db5d
workingDir: /workspace/build/source
workingDir: /workspace/build
computeResources:
requests:
cpu: 250m
@@ -418,6 +420,7 @@ spec:
script: |
#!/bin/sh
set -eu
cd /workspace/build/source
node tools/cdn/cli.mjs package \
--site-root /workspace/build/runtime/app/site \
--output-root /workspace/build/cdn \