perf: 릴리스 프론트엔드 빌드를 안전하게 캐시
Gateway와 Profile 릴리스의 타입검사와 Vite 번들을 별도 Turbo 작업으로 캐시한다. DB 보존 DEPLOY는 game-api만 빌드하고 기본 동시성 1과 기존 산출물 계약은 유지한다.
This commit is contained in:
@@ -5,6 +5,7 @@ import { stripVTControlCharacters } from 'node:util';
|
||||
import {
|
||||
assertReleaseComponents,
|
||||
buildTurboReleaseCommand,
|
||||
buildTurboReleaseTaskCommand,
|
||||
type BuildCommand,
|
||||
type BuildProgressEvent,
|
||||
type BuildRunner,
|
||||
@@ -43,10 +44,12 @@ const buildGatewayReleaseCommands = (
|
||||
};
|
||||
return [
|
||||
...(needsInstall ? [{ command: 'pnpm', args: ['install', '--frozen-lockfile'], cwd: workspaceRoot, env }] : []),
|
||||
buildTurboReleaseCommand(
|
||||
buildTurboReleaseCommand(workspaceRoot, config.workspaceRoot, ['@sammo-ts/gateway-api'], env),
|
||||
buildTurboReleaseTaskCommand(
|
||||
workspaceRoot,
|
||||
config.workspaceRoot,
|
||||
['@sammo-ts/gateway-api', '@sammo-ts/gateway-frontend'],
|
||||
'build:release',
|
||||
['@sammo-ts/gateway-frontend'],
|
||||
env
|
||||
),
|
||||
];
|
||||
|
||||
@@ -220,6 +220,11 @@ describe('GatewayReleaseController', () => {
|
||||
expect(commandGroups[0]?.[0]).toBe('install --frozen-lockfile');
|
||||
expect(commandGroups[0]?.[1]).toContain('turbo run build');
|
||||
expect(commandGroups[0]?.[1]).toContain('--cache-dir=/srv/sammo/controller/.turbo/release-cache');
|
||||
expect(commandGroups[0]?.[1]).toContain('--filter=@sammo-ts/gateway-api');
|
||||
expect(commandGroups[0]?.[1]).not.toContain('--filter=@sammo-ts/gateway-frontend');
|
||||
expect(commandGroups[0]?.[2]).toContain('turbo run build:release');
|
||||
expect(commandGroups[0]?.[2]).toContain('--filter=@sammo-ts/gateway-frontend');
|
||||
expect(commandGroups[0]?.[2]).toContain('--concurrency=1');
|
||||
expect(commandGroups[1]).toEqual(['--filter @sammo-ts/infra prisma:migrate:deploy:gateway']);
|
||||
expect([...running.keys()].sort()).toEqual([...gatewayNames].sort());
|
||||
expect(harness.published).toEqual([
|
||||
|
||||
Reference in New Issue
Block a user