diff --git a/config/ci/product-gates.json b/config/ci/product-gates.json new file mode 100644 index 00000000..2849a590 --- /dev/null +++ b/config/ci/product-gates.json @@ -0,0 +1,5 @@ +{ + "schemaVersion": 1, + "deployment": null, + "mergeGates": [] +} diff --git a/docs/manual/03-outside-feature-folder.md b/docs/manual/03-outside-feature-folder.md index 1c13012f..0a777c43 100644 --- a/docs/manual/03-outside-feature-folder.md +++ b/docs/manual/03-outside-feature-folder.md @@ -107,6 +107,7 @@ release admission refused for staging: - `src/contracts/product-contracts.ts`: 제품 인증 프로필이나 제품 런타임 설정 키가 필요할 때. - 템플릿 파일 `src/contracts/rest-profiles.ts`는 고치지 않는다. - `config/runtime/.json`: 환경별로 기능을 끄고 싶을 때(`FEATURE_OVERRIDES`). +- `config/ci/product-gates.json`: 배포 job(`deployment`)을 채우거나 제품 전용 merge 검사(`PRODUCT-GATE-NNN`)를 더할 때. 템플릿 파일 `config/ci/gates.json`은 고치지 않는다. 형식은 [`ci-quality-gates.md`](../operations/ci-quality-gates.md)에 있다. - `package.json`, lockfile, `config/security/dependency-change-evidence.json`: 계약 패키지를 더할 때(B절). 정본 표에 없는 것: diff --git a/docs/operations/ci-quality-gates.md b/docs/operations/ci-quality-gates.md index c54fd10e..63634d0f 100644 --- a/docs/operations/ci-quality-gates.md +++ b/docs/operations/ci-quality-gates.md @@ -342,9 +342,44 @@ name the candidate's entry script (1103/13-01). The workflow deploys nothing itself. Between `promotion` and `production_gate` sits the `deployment` job, the project's deployment slot. It is empty by default: it reports `deployed=false`, FE-GATE-019 does not probe the host and ends `UNVERIFIED` -(exit 3), and the production stage stays open. To fill it, edit the -`deployment` job in `config/ci/gates.json` and run `corepack pnpm -generate:ci-workflow`. The contract allows the steps `checkout`, `setup-node`, +(exit 3), and the production stage stays open. To fill it, set `deployment` +in the product-owned `config/ci/product-gates.json` and run `corepack pnpm +generate:ci-workflow` (1103/12-07): + +```json +{ + "schemaVersion": 1, + "deployment": { + "script": "deploy:desktop", + "environment": [ + { "name": "DEPLOY_HOST", "value": "${{ vars.DEPLOY_HOST }}" }, + { "name": "DEPLOY_SSH_KEY", "value": "${{ secrets.DEPLOY_SSH_KEY }}" } + ] + }, + "mergeGates": [] +} +``` + +The template renders the rest of the slot: it downloads the `promoted-release` +transfer, extracts it to `.release/promoted-release` against the candidate +digest, then runs the script, which deploys `.release/promoted-release/dist`. +`environment` takes only `vars.*` and `secrets.*` values. The template ships +this file empty and never changes it, so a template sync does not meet it; +`config/ci/gates.json` stays the template's, and its contract baseline counts +the template contract only. A slot filled in both files is refused. + +`mergeGates` adds the product's own checks, such as a contract check against +the paired backend: `{ "id": "PRODUCT-GATE-001", "name": "backend-contract", +"script": "check:backend-contract" }`. Ids are `PRODUCT-GATE-NNN`; the +`FE-GATE-NNN` ids, their commands, artifacts and readiness formula stay the +template's. Each runs as `corepack pnpm