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
View File
@@ -65,6 +65,11 @@ CI에서 source SHA + LF + PipelineRun UID의 SHA-256 앞 16자를
계산하고 같은 CDN 설정을 SSR·WASM에 컴파일합니다. BuildKit은 단일 solve에서 image와 local
rootfs를 함께 내보냅니다. `/app/site`를 다시 빌드하지 않고 앱 저장소 `tools/cdn`으로 포장합니다.
CDN 단계의 `workingDir`는 공유 볼륨 루트인 `/workspace/build`로 두고, 스크립트에서
`cd /workspace/build/source`를 실행합니다. 아직 clone하지 않은 경로를 `workingDir`로
지정하면 컨테이너 준비 과정이 root 소유 디렉터리를 먼저 만들어 UID 1000의 Git 쓰기를
막을 수 있습니다. checkout 디렉터리는 `clone-source`가 직접 만들도록 유지합니다.
`pkg/`는 원본·br·gzip, `assets/`는 WOFF2 원본만 S3에 게시합니다. 나머지 공개 파일은
프로젝트 HTTPS 원본이 제공합니다. 모든 객체를 조건부 PUT 후 checksum-enabled HEAD로
검사하며, 완료 매니페스트가 성공해야 CDN Task 결과와 후속 GitOps 갱신을 허용합니다.