perf(blog): preserve dependency cache before quality checks
This commit is contained in:
1 parent
83efb25978
commit
be032170db
2 files changed
+23
-4
No files matched your search
+8
-4
@@ -26,11 +26,13 @@ signed Gitea push
|
||||
|
||||
PipelineRun은 공유 `tekton-ci`의 ARM64 노드, 10 GiB `local-path` PVC를 사용합니다.
|
||||
최대 시간은 90분(Tasks 85분)입니다. quality의 메모리 요청은 6Gi, 이미지 빌드는 2Gi이며
|
||||
두 빌드의 메모리 제한은 10Gi입니다. Cargo jobs는 1이며 incremental은 끕니다.
|
||||
두 빌드의 메모리 제한은 10Gi입니다. 의존성은 Cargo jobs=4, 실제 앱 컴파일은 jobs=1이며
|
||||
incremental은 끕니다. 도구는 버전·SHA256을 고정한 공식 ARM64/AMD64 바이너리로 설치합니다.
|
||||
quality는 dev/test debug symbols도 끕니다.
|
||||
공통 quota와 완료 실행 정리는 platform-state 소유입니다.
|
||||
|
||||
quality는 rootless BuildKit으로 앱 Dockerfile의 `quality` target을 명시적으로 빌드합니다.
|
||||
quality는 rootless BuildKit으로 앱 Dockerfile의 `quality-deps`를 먼저 빌드·캐시한 다음
|
||||
`quality` target을 명시적으로 빌드합니다. cargo-leptos는 release에서만 설치합니다.
|
||||
내부의 `sh tools/ci/check.sh`는 Rust 1.100.0으로 fmt·SSR 전체 테스트(아키텍처 포함)·
|
||||
WASM check를 실행합니다. SSR 컴파일은 테스트가 담당하며 중복 check는 실행하지 않습니다.
|
||||
MongoDB/Infisical에는 연결하지 않습니다. 상호작용·라우팅·폼·
|
||||
@@ -44,8 +46,10 @@ hydration 변경 시 필요한 Playwright 검증은 앱 README의 별도 절차
|
||||
DB/Entra ID Secret은 quality, Docker build, WASM 번들에서 사용하지 않습니다.
|
||||
|
||||
두 BuildKit 작업은 `registry.dahyeon.us/dahyeon/blog`의
|
||||
`cache-quality-arm64-<staging|prod>` / `cache-release-arm64-<staging|prod>` 태그를
|
||||
`mode=max`로 저장합니다. 같은 브랜치의 두 캐시를 읽어 도구 레이어도 재사용하되,
|
||||
`cache-quality-deps-arm64-<staging|prod>`, `cache-quality-arm64-<staging|prod>`,
|
||||
`cache-release-arm64-<staging|prod>` 태그를 `mode=max`로 저장합니다.
|
||||
앱 검사 전에 의존성 캐시를 저장하여 검사 실패 시에도 다음 실행에서 재사용합니다.
|
||||
같은 브랜치의 캐시를 읽어 도구 레이어도 재사용하되,
|
||||
검사의 dev-ui/test 산출물과 배포의 release 산출물은 별도 의존성 단계로 관리합니다.
|
||||
변경 없는 검사 입력은 성공한 quality 레이어를 재사용할 수 있습니다.
|
||||
최초 실행은 캐시가 없어도 진행합니다. 캐시 태그는 덮어쓰기를 허용하고 Harbor 정리 정책에서
|
||||
|
||||
@@ -121,6 +121,19 @@ spec:
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
case "$DEPLOY_ENV" in staging|prod) ;; *) echo 'Invalid deployment environment' >&2; exit 1;; esac
|
||||
# Export dependencies before checking the app, so a failed check does
|
||||
# not discard all the work performed by this ephemeral builder.
|
||||
buildctl-daemonless.sh build \
|
||||
--frontend dockerfile.v0 \
|
||||
--local context="$SOURCE_DIR" \
|
||||
--local dockerfile="$SOURCE_DIR" \
|
||||
--opt filename=Dockerfile \
|
||||
--opt target=quality-deps \
|
||||
--opt platform=linux/arm64 \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-deps-arm64-$DEPLOY_ENV" \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-arm64-$DEPLOY_ENV" \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-release-arm64-$DEPLOY_ENV" \
|
||||
--export-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-deps-arm64-$DEPLOY_ENV,mode=max,image-manifest=true,oci-mediatypes=true"
|
||||
buildctl-daemonless.sh build \
|
||||
--frontend dockerfile.v0 \
|
||||
--local context="$SOURCE_DIR" \
|
||||
@@ -128,6 +141,7 @@ spec:
|
||||
--opt filename=Dockerfile \
|
||||
--opt target=quality \
|
||||
--opt platform=linux/arm64 \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-deps-arm64-$DEPLOY_ENV" \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-arm64-$DEPLOY_ENV" \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-release-arm64-$DEPLOY_ENV" \
|
||||
--export-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-arm64-$DEPLOY_ENV,mode=max,image-manifest=true,oci-mediatypes=true"
|
||||
@@ -264,6 +278,7 @@ spec:
|
||||
--opt target=runtime \
|
||||
--opt platform=linux/arm64 \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-release-arm64-$DEPLOY_ENV" \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-deps-arm64-$DEPLOY_ENV" \
|
||||
--import-cache "type=registry,ref=$CACHE_REPOSITORY:cache-quality-arm64-$DEPLOY_ENV" \
|
||||
--export-cache "type=registry,ref=$CACHE_REPOSITORY:cache-release-arm64-$DEPLOY_ENV,mode=max,image-manifest=true,oci-mediatypes=true" \
|
||||
--output "type=image,name=$IMAGE,push=true" \
|
||||
|
||||
Reference in new issue
Block a user