frontend-quality-gates / merge / static checks (pull_request) Successful in 1m20s
frontend-quality-gates / merge / tests (pull_request) Failing after 10m12s
frontend-quality-gates / merge / browser tests (pull_request) Successful in 5m38s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Skipped
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Skipped
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Skipped
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Skipped
frontend-quality-gates / external-vulnerability-provider (pull_request) Skipped
frontend-quality-gates / external-provenance-provider (pull_request) Skipped
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Skipped
frontend-quality-gates / deploy-promoted-release (pull_request) Skipped
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Skipped
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Skipped
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Skipped
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Skipped
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Skipped
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Skipped
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Skipped
frontend-quality-gates / main / self-tests and removal drills (pull_request) Skipped
PR run은 무엇을 바꿨든 merge 게이트 14개를 전부 돈다. 문서만 고친 PR도 scaffold 드릴(FE-GATE-020, run 241 tests job 15:58 중 약 8.5분)과 브라우저 게이트를 돈다. 소유자가 「PR은 바뀐 범위만, 문서만이면 문서 검사, 공용 파일이면 전체, 건너뛴 검사는 로그에, 경로표는 계약 시험으로」를 정했다(2026-11-13, design-docs ci/manual.md 4절, 계획 FE-2). config/ci/pr-gate-selection.json이 경로표다. global 파일(config/, scripts/, .gitea/, 도구 설정, lockfile 등)이나 어느 줄에도 안 걸리는 파일이 하나라도 바뀌면 전부 돈다. 아니면 파일마다 rules를 위에서부터 보고, 처음 맞는 줄의 게이트를 always(001·002·003·010)에 더한다. - 문서(docs/**, **/*.md, .claude/**)는 FE-GATE-005까지 돈다. - 접근성 기록은 009·020까지, recipes는 007·012까지 돈다. - scaffold 드릴 입력(src/features 등)은 앱 게이트와 020을 돈다. - 그 밖의 src·tests는 020을 뺀 앱 게이트를 돈다. scripts/lib/pr-gate-selection.ts가 판정한다. run-ci-gate.ts는 CI_PR_BASE_REF(pull_request run에서만 base 브랜치, 나머지는 빈 값)가 있을 때만 판정을 부른다. 안 도는 게이트는 `건너뜀: <ID> — <이유>`를 찍고 게이트 로그도 그 한 줄로 남긴 뒤 성공으로 끝난다. diff는 base와의 merge base에서 잰다. checkout이 얕아 처음 한 번 history를 받는다. 받지 못하거나 diff를 못 읽으면 이유를 찍고 전부 돈다. merge job 셋의 env 바인딩은 계약(expectedEnvironmentBindings)과 gates.json에 두고 workflow를 다시 만들었다. 버린 대안: - workflow on.paths·job if:로 건너뛰기: 필수 검사가 보고 없이 남는다 (매뉴얼 4.4절). - 고르는 job을 따로 두기: needs job이 줄 끝으로 간다. - vitest --changed: coverage 문턱이 전체 실행을 전제한다. - 맞는 줄을 모두 합치기: src 아래 AGENTS.md 같은 문서가 앱 게이트 전부를 불렀다. 위험·한계: - 경로표가 놓친 실패는 main push가 잡는다. main은 늘 전부 돈다. - scaffold 줄은 드릴 스크립트가 이름으로 부르는 src·tests 경로를 손으로 옮긴 것이다. 계약 시험이 그 이름들이 scaffold 줄에 걸리는지 본다. - 공개 repo라 checkout의 origin에서 인증 없이 fetch한다. 비공개로 바뀌면 fetch가 실패하고 전부 돈다(로그에 이유). 검증(desktop): pr-gate-selection 시험(표가 merge 게이트 전부를 덮음, 추적 파일 1631개 전부가 줄에 걸림, scaffold 드릴 이름 범위, 문서만·접근성· 앱·scaffold·전역·모르는 파일·빈 diff 선택, 건너뜀 문구 형식, 실제 git 얕은 clone에서 merge base diff, fetch 실패면 전부)을 3회 통과했다. test-timeout-declarations 통과. 자식 프로세스 시험 둘의 timeout은 잰 값 48 ms·291 ms다. check:ci-workflow, check:types:node·test, eslint 통과. scripts/verify.sh merge(CI=true, main950ea11a위, 트리e031a8a5): 14개 전부 rc=0(008 282초, 020 404초). gate FE-GATE-029 rc=0.
694 lines
34 KiB
YAML
694 lines
34 KiB
YAML
# GENERATED FILE — edit config/ci/gates.json and run `corepack pnpm generate:ci-workflow`.
|
|
name: frontend-quality-gates
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
inputs:
|
|
stage:
|
|
description: Highest promotion tier to evaluate
|
|
required: true
|
|
default: merge
|
|
type: choice
|
|
options:
|
|
- merge
|
|
- main
|
|
- release
|
|
- production
|
|
- field
|
|
- documentation
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: frontend-quality-gates-${{ gitea.event_name }}-${{ gitea.ref }}-${{ inputs.stage }}
|
|
cancel-in-progress: ${{ gitea.event_name != 'workflow_dispatch' }}
|
|
|
|
env:
|
|
CI: "true"
|
|
VITE_BUILD_ID: "gitea-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
VITE_COMMIT_SHA: "${{ gitea.sha }}"
|
|
RELEASE_ID: "${{ gitea.ref }}-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
CI_RUNNER_IMAGE: "${{ vars.RUNNER_IMAGE_DIGEST }}"
|
|
|
|
jobs:
|
|
merge_static:
|
|
name: "merge / static checks"
|
|
if: ${{ gitea.event_name != 'workflow_dispatch' || (inputs.stage != 'documentation' && inputs.stage != 'main') }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
CI_PR_BASE_REF: "${{ gitea.event_name == 'pull_request' && gitea.base_ref || '' }}"
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- name: Choose the dependency cache folder
|
|
id: dependency-cache-root
|
|
run: bash scripts/ci/dependency-cache-root.sh "$RUNNER_TEMP" "$(dirname "$GITHUB_WORKSPACE")"
|
|
- name: Restore and save the dependency cache
|
|
if: ${{ gitea.ref == 'refs/heads/main' }}
|
|
uses: https://github.com/actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: |
|
|
/opt/hostedtoolcache/node
|
|
${{ steps.dependency-cache-root.outputs.root }}
|
|
key: fe-dependencies-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', 'pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
fe-dependencies-${{ runner.os }}-${{ runner.arch }}-
|
|
- name: Restore the dependency cache
|
|
if: ${{ gitea.ref != 'refs/heads/main' }}
|
|
uses: https://github.com/actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: |
|
|
/opt/hostedtoolcache/node
|
|
${{ steps.dependency-cache-root.outputs.root }}
|
|
key: fe-dependencies-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', 'pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
fe-dependencies-${{ runner.os }}-${{ runner.arch }}-
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: "FE-GATE-001 / manifest-lockfile"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-001
|
|
- name: "FE-GATE-002 / lint"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-002
|
|
- name: "FE-GATE-003 / typecheck"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-003
|
|
- name: "FE-GATE-010 / architecture"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-010
|
|
- name: "FE-GATE-011 / build"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-011
|
|
- name: "FE-GATE-012 / bundle"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-012
|
|
- name: Upload merge static evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "merge-static-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
merge_test:
|
|
name: "merge / tests"
|
|
if: ${{ gitea.event_name != 'workflow_dispatch' || (inputs.stage != 'documentation' && inputs.stage != 'main') }}
|
|
# FE-GATE-013 runner requirement: Linux with executable /usr/bin/bwrap (with --size), /usr/bin/prlimit, /usr/bin/systemd-run, /usr/bin/systemctl and /usr/bin/tar, an active systemd user manager 254 or newer, and unified cgroup v2 with delegated memory, pids and cpu controllers
|
|
# FE-GATE-013 runner requirement: unprivileged user and network namespaces for bwrap (the provider sandbox runs bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-net); Ubuntu 23.10 and later refuse them while kernel.apparmor_restrict_unprivileged_userns=1 unless /usr/bin/bwrap has an AppArmor profile that allows userns; scripts/check-system-test-prerequisites.ts probes this before test:system runs and scripts/run-and-validate-provider.ts before a provider runs
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
CI_PR_BASE_REF: "${{ gitea.event_name == 'pull_request' && gitea.base_ref || '' }}"
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- name: Choose the dependency cache folder
|
|
id: dependency-cache-root
|
|
run: bash scripts/ci/dependency-cache-root.sh "$RUNNER_TEMP" "$(dirname "$GITHUB_WORKSPACE")"
|
|
- name: Restore and save the dependency cache
|
|
if: ${{ gitea.ref == 'refs/heads/main' }}
|
|
uses: https://github.com/actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: |
|
|
/opt/hostedtoolcache/node
|
|
${{ steps.dependency-cache-root.outputs.root }}
|
|
key: fe-dependencies-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', 'pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
fe-dependencies-${{ runner.os }}-${{ runner.arch }}-
|
|
- name: Restore the dependency cache
|
|
if: ${{ gitea.ref != 'refs/heads/main' }}
|
|
uses: https://github.com/actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: |
|
|
/opt/hostedtoolcache/node
|
|
${{ steps.dependency-cache-root.outputs.root }}
|
|
key: fe-dependencies-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', 'pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
fe-dependencies-${{ runner.os }}-${{ runner.arch }}-
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: "FE-GATE-004 / runtime-schema"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-004
|
|
- name: "FE-GATE-005 / unit"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-005
|
|
- name: "FE-GATE-006 / component"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-006
|
|
- name: "FE-GATE-007 / integration"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-007
|
|
- name: "FE-GATE-013 / security"
|
|
if: ${{ !cancelled() }}
|
|
run: scripts/run-in-system-container.sh corepack pnpm ci:gate -- FE-GATE-013
|
|
- name: "FE-GATE-020 / removability"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-020
|
|
- name: Upload merge test evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "merge-test-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
merge_browser:
|
|
name: "merge / browser tests"
|
|
if: ${{ gitea.event_name != 'workflow_dispatch' || (inputs.stage != 'documentation' && inputs.stage != 'main') }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
container:
|
|
image: "mcr.microsoft.com/playwright:v1.62.0-noble@sha256:baed2032d533817f3dbe6425de795788430ba345e819a1201337009ba17c9d07"
|
|
options: "--shm-size=2g"
|
|
env:
|
|
CI_RUNNER_IMAGE: "mcr.microsoft.com/playwright:v1.62.0-noble@sha256:baed2032d533817f3dbe6425de795788430ba345e819a1201337009ba17c9d07"
|
|
CI_PR_BASE_REF: "${{ gitea.event_name == 'pull_request' && gitea.base_ref || '' }}"
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- name: Choose the dependency cache folder
|
|
id: dependency-cache-root
|
|
run: bash scripts/ci/dependency-cache-root.sh "$RUNNER_TEMP" "$(dirname "$GITHUB_WORKSPACE")"
|
|
- name: Restore and save the dependency cache
|
|
if: ${{ gitea.ref == 'refs/heads/main' }}
|
|
uses: https://github.com/actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: |
|
|
/opt/hostedtoolcache/node
|
|
${{ steps.dependency-cache-root.outputs.root }}
|
|
key: fe-dependencies-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', 'pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
fe-dependencies-${{ runner.os }}-${{ runner.arch }}-
|
|
- name: Restore the dependency cache
|
|
if: ${{ gitea.ref != 'refs/heads/main' }}
|
|
uses: https://github.com/actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: |
|
|
/opt/hostedtoolcache/node
|
|
${{ steps.dependency-cache-root.outputs.root }}
|
|
key: fe-dependencies-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', 'pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
fe-dependencies-${{ runner.os }}-${{ runner.arch }}-
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Install visual-test fonts
|
|
run: |
|
|
$(command -v sudo || true) apt-get update
|
|
$(command -v sudo || true) apt-get install -y fonts-noto-core fonts-noto-cjk fonts-noto-cjk-extra fonts-liberation
|
|
- name: "FE-GATE-008 / e2e"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-008
|
|
- name: "FE-GATE-009 / accessibility"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-009
|
|
- name: Upload merge browser evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "merge-browser-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
release_gate:
|
|
name: "${{ matrix.gate }} / ${{ matrix.name }}"
|
|
needs: [merge_static, merge_test, merge_browser]
|
|
if: ${{ startsWith(gitea.ref, 'refs/tags/v') || (gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'release' || inputs.stage == 'production' || inputs.stage == 'field')) }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
RELEASE_TAG: "${{ startsWith(gitea.ref, 'refs/tags/v') && gitea.ref_name || '' }}"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { gate: FE-GATE-014, name: config-compatibility, browser: false }
|
|
- { gate: FE-GATE-026, name: lab-performance, browser: true }
|
|
- { gate: FE-GATE-028, name: manual-accessibility-review, browser: false }
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Install Playwright browsers
|
|
if: ${{ matrix.browser }}
|
|
run: |
|
|
corepack pnpm exec playwright install --with-deps chromium firefox webkit
|
|
$(command -v sudo || true) apt-get install -y fonts-noto-core fonts-noto-cjk fonts-noto-cjk-extra fonts-liberation
|
|
- name: Run blocking gate
|
|
run: corepack pnpm ci:gate -- ${{ matrix.gate }}
|
|
- name: Upload release gate evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "${{ matrix.gate }}-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
immutable_build:
|
|
name: "FE-GATE-015 / immutable-release-candidate"
|
|
needs: release_gate
|
|
if: ${{ startsWith(gitea.ref, 'refs/tags/v') || (gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'release' || inputs.stage == 'production' || inputs.stage == 'field')) }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
outputs:
|
|
dist_sha256: ${{ steps.candidate.outputs.dist_sha256 }}
|
|
archive_sha256: ${{ steps.candidate.outputs.archive_sha256 }}
|
|
env:
|
|
APP_PROFILE: "${{ vars.APP_PROFILE }}"
|
|
RELEASE_TARGET: "${{ vars.RELEASE_TARGET }}"
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Build candidate once and verify local evidence
|
|
run: corepack pnpm ci:gate -- FE-GATE-015
|
|
- name: Admit the candidate to the declared release target
|
|
run: corepack pnpm ci:gate -- FE-GATE-027
|
|
- name: Archive and validate the exact candidate file set
|
|
id: candidate
|
|
run: |
|
|
mkdir -p .release
|
|
tar --sort=name --mtime="@0" --owner=0 --group=0 --numeric-owner -czf ".release/release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tar.gz" \
|
|
dist \
|
|
pnpm-lock.yaml \
|
|
artifacts/performance/bundle.json \
|
|
artifacts/quality/vite-module-inventory.json \
|
|
artifacts/release/build-manifest.json \
|
|
artifacts/release/checksums.txt \
|
|
artifacts/release/dependency-inventory.json \
|
|
artifacts/release/provenance.json \
|
|
artifacts/release/verification.json \
|
|
artifacts/release/sbom.cdx.json \
|
|
artifacts/security/dependency-diff.json \
|
|
artifacts/security/license-report.json \
|
|
artifacts/security/local-evidence-assessment.json \
|
|
artifacts/security/scan.sarif \
|
|
artifacts/security/supply-chain-coherence.json \
|
|
artifacts/security/supply-chain-verification.json \
|
|
artifacts/security/vulnerability-report.json \
|
|
config/schemas/artifacts/build-manifest.schema.json \
|
|
config/schemas/artifacts/dependency-inventory.schema.json \
|
|
config/schemas/artifacts/supply-chain-verification.schema.json \
|
|
config/security/dependency-baseline.approval.json \
|
|
config/security/dependency-baseline.json \
|
|
config/security/dependency-change-evidence.json \
|
|
config/security/dependency-policy.json \
|
|
config/security/secret-scan-policy.json \
|
|
config/security/vulnerability-exceptions.json \
|
|
config/security/vulnerability-policy.json \
|
|
scripts/contracts/release-artifacts.ts \
|
|
scripts/create-release-candidate.ts \
|
|
scripts/generate-supply-chain.ts \
|
|
scripts/lib/build-manifest-outputs.ts \
|
|
scripts/lib/json-schema.ts \
|
|
scripts/lib/local-policy-evidence.ts \
|
|
scripts/lib/local-release-evidence.ts \
|
|
scripts/lib/release-candidate.ts \
|
|
scripts/lib/release-input-evidence.ts \
|
|
scripts/lib/release-runtime-coherence.ts \
|
|
scripts/lib/repository-file-inventory.ts \
|
|
scripts/lib/secret-scan-evaluator.ts \
|
|
scripts/lib/secret-scan-policy.ts \
|
|
scripts/lib/secret-scan.ts \
|
|
scripts/lib/supply-chain.ts \
|
|
scripts/lib/validated-json-artifact.ts \
|
|
src/contracts/release-artifacts.ts \
|
|
src/features/installed-contract-contributions.ts \
|
|
src/features/installed-feature-contracts.ts \
|
|
artifacts/release/release-candidate.json
|
|
node scripts/verify-ci-candidate-archive.ts --archive ".release/release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tar.gz" --github-output "$GITHUB_OUTPUT"
|
|
- name: Upload release candidate
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: ".release/release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tar.gz"
|
|
if-no-files-found: error
|
|
- name: Upload immutable gate evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "immutable-gate-evidence-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: |
|
|
artifacts/quality/gates/FE-GATE-015.txt
|
|
artifacts/release/release-candidate.json
|
|
artifacts/release/verification.json
|
|
artifacts/security/supply-chain-coherence.json
|
|
artifacts/quality/gates/FE-GATE-027.txt
|
|
artifacts/release/deployment-admission.json
|
|
artifacts/security/dependency-advisories.json
|
|
if-no-files-found: error
|
|
|
|
vulnerability_provider:
|
|
name: external-vulnerability-provider
|
|
needs: immutable_build
|
|
# provider sandbox runner requirement: Linux with executable /usr/bin/bwrap (with --size), /usr/bin/prlimit, /usr/bin/systemd-run, /usr/bin/systemctl and /usr/bin/tar, an active systemd user manager 254 or newer, and unified cgroup v2 with delegated memory, pids and cpu controllers
|
|
# provider sandbox runner requirement: unprivileged user and network namespaces for bwrap (the provider sandbox runs bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-net); Ubuntu 23.10 and later refuse them while kernel.apparmor_restrict_unprivileged_userns=1 unless /usr/bin/bwrap has an AppArmor profile that allows userns; scripts/check-system-test-prerequisites.ts probes this before test:system runs and scripts/run-and-validate-provider.ts before a provider runs
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
outputs:
|
|
invocation_nonce: ${{ steps.supervise_vulnerability.outputs.invocation_nonce }}
|
|
env:
|
|
CANDIDATE_ARCHIVE_SHA256: "${{ needs.immutable_build.outputs.archive_sha256 }}"
|
|
CANDIDATE_ARCHIVE_PATH: ".release/vulnerability-candidate/release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tar.gz"
|
|
CI_RUN_ID: "${{ gitea.run_id }}"
|
|
CI_RUN_ATTEMPT: "${{ gitea.run_attempt }}"
|
|
EXPECTED_SOURCE_REVISION: "${{ gitea.sha }}"
|
|
VULNERABILITY_PUBLIC_KEY_PATH: "${{ vars.VULNERABILITY_PUBLIC_KEY_PATH }}"
|
|
VULNERABILITY_KEY_ID: "${{ vars.VULNERABILITY_KEY_ID }}"
|
|
VULNERABILITY_PROVIDER_COMMAND: "${{ vars.VULNERABILITY_PROVIDER_COMMAND }}"
|
|
VULNERABILITY_REPORT_PATH: provider-evidence/untrusted/vulnerability-report.json
|
|
VALIDATED_PROVIDER_REPORT_PATH: provider-evidence/vulnerability-report.json
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Download release candidate
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: "release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: .release/vulnerability-candidate
|
|
- name: Run and validate external vulnerability provider in one trusted supervisor
|
|
id: supervise_vulnerability
|
|
run: node scripts/run-and-validate-provider.ts --kind vulnerability
|
|
- name: Confirm sealed vulnerability provider evidence
|
|
run: test -s "$VALIDATED_PROVIDER_REPORT_PATH"
|
|
- name: Upload vulnerability provider evidence
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "vulnerability-provider-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: provider-evidence/vulnerability-report.json
|
|
if-no-files-found: error
|
|
|
|
provenance_provider:
|
|
name: external-provenance-provider
|
|
needs: immutable_build
|
|
# provider sandbox runner requirement: Linux with executable /usr/bin/bwrap (with --size), /usr/bin/prlimit, /usr/bin/systemd-run, /usr/bin/systemctl and /usr/bin/tar, an active systemd user manager 254 or newer, and unified cgroup v2 with delegated memory, pids and cpu controllers
|
|
# provider sandbox runner requirement: unprivileged user and network namespaces for bwrap (the provider sandbox runs bwrap --unshare-pid --unshare-ipc --unshare-uts --unshare-net); Ubuntu 23.10 and later refuse them while kernel.apparmor_restrict_unprivileged_userns=1 unless /usr/bin/bwrap has an AppArmor profile that allows userns; scripts/check-system-test-prerequisites.ts probes this before test:system runs and scripts/run-and-validate-provider.ts before a provider runs
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
outputs:
|
|
invocation_nonce: ${{ steps.supervise_provenance.outputs.invocation_nonce }}
|
|
env:
|
|
CANDIDATE_ARCHIVE_SHA256: "${{ needs.immutable_build.outputs.archive_sha256 }}"
|
|
CANDIDATE_ARCHIVE_PATH: ".release/provenance-candidate/release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tar.gz"
|
|
CI_RUN_ID: "${{ gitea.run_id }}"
|
|
CI_RUN_ATTEMPT: "${{ gitea.run_attempt }}"
|
|
EXPECTED_SOURCE_REVISION: "${{ gitea.sha }}"
|
|
PROVENANCE_PUBLIC_KEY_PATH: "${{ vars.PROVENANCE_PUBLIC_KEY_PATH }}"
|
|
PROVENANCE_KEY_ID: "${{ vars.PROVENANCE_KEY_ID }}"
|
|
PROVENANCE_PROVIDER_COMMAND: "${{ vars.PROVENANCE_PROVIDER_COMMAND }}"
|
|
PROVENANCE_ATTESTATION_PATH: provider-evidence/untrusted/provenance-attestation.json
|
|
VALIDATED_PROVIDER_REPORT_PATH: provider-evidence/provenance-attestation.json
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Download release candidate
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: "release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: .release/provenance-candidate
|
|
- name: Run and validate external provenance provider in one trusted supervisor
|
|
id: supervise_provenance
|
|
run: node scripts/run-and-validate-provider.ts --kind provenance
|
|
- name: Confirm sealed provenance provider evidence
|
|
run: test -s "$VALIDATED_PROVIDER_REPORT_PATH"
|
|
- name: Upload provenance provider evidence
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "provenance-provider-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: provider-evidence/provenance-attestation.json
|
|
if-no-files-found: error
|
|
|
|
promotion:
|
|
name: promote-verified-immutable-candidate
|
|
needs: [immutable_build, vulnerability_provider, provenance_provider]
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
CANDIDATE_ARCHIVE_SHA256: "${{ needs.immutable_build.outputs.archive_sha256 }}"
|
|
CANDIDATE_ARCHIVE_PATH: ".release/candidate/release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}.tar.gz"
|
|
CI_RUN_ID: "${{ gitea.run_id }}"
|
|
CI_RUN_ATTEMPT: "${{ gitea.run_attempt }}"
|
|
VULNERABILITY_REPORT_PATH: "${{ gitea.workspace }}/.release/vulnerability/vulnerability-report.json"
|
|
PROVENANCE_ATTESTATION_PATH: "${{ gitea.workspace }}/.release/provenance/provenance-attestation.json"
|
|
VULNERABILITY_PUBLIC_KEY_PATH: "${{ vars.VULNERABILITY_PUBLIC_KEY_PATH }}"
|
|
VULNERABILITY_KEY_ID: "${{ vars.VULNERABILITY_KEY_ID }}"
|
|
PROVENANCE_PUBLIC_KEY_PATH: "${{ vars.PROVENANCE_PUBLIC_KEY_PATH }}"
|
|
PROVENANCE_KEY_ID: "${{ vars.PROVENANCE_KEY_ID }}"
|
|
VULNERABILITY_INVOCATION_NONCE: "${{ needs.vulnerability_provider.outputs.invocation_nonce }}"
|
|
PROVENANCE_INVOCATION_NONCE: "${{ needs.provenance_provider.outputs.invocation_nonce }}"
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Download release candidate
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: "release-candidate-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: .release/candidate
|
|
- name: Download vulnerability provider evidence
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: "vulnerability-provider-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: .release/vulnerability
|
|
- name: Download provenance provider evidence
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: "provenance-provider-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: .release/provenance
|
|
- name: Finalize verified promotion from inode-bound captured inputs
|
|
id: finalize
|
|
run: node scripts/stage-verified-promotion.ts
|
|
- name: Upload promoted release
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "promoted-release-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: |
|
|
${{ steps.finalize.outputs.staging_root }}/release-candidate.tar.gz
|
|
${{ steps.finalize.outputs.staging_root }}/vulnerability-report.json
|
|
${{ steps.finalize.outputs.staging_root }}/provenance-attestation.json
|
|
${{ steps.finalize.outputs.staging_root }}/provider-verification.json
|
|
${{ steps.finalize.outputs.staging_root }}/promotion-verification.json
|
|
if-no-files-found: error
|
|
- name: Always remove private promotion staging
|
|
if: always()
|
|
env:
|
|
PROMOTION_STAGING_ROOT: ${{ steps.finalize.outputs.staging_root }}
|
|
PROMOTION_CLEANUP_TOKEN: ${{ steps.finalize.outputs.cleanup_token }}
|
|
PROMOTION_RUNNER_TEMP_DEV: ${{ steps.finalize.outputs.runner_temp_dev }}
|
|
PROMOTION_RUNNER_TEMP_INO: ${{ steps.finalize.outputs.runner_temp_ino }}
|
|
PROMOTION_STAGING_DEV: ${{ steps.finalize.outputs.staging_dev }}
|
|
PROMOTION_STAGING_INO: ${{ steps.finalize.outputs.staging_ino }}
|
|
run: |
|
|
if [ -n "$PROMOTION_STAGING_ROOT" ] && [ -n "$PROMOTION_CLEANUP_TOKEN" ] && [ -n "$PROMOTION_RUNNER_TEMP_DEV" ] && [ -n "$PROMOTION_RUNNER_TEMP_INO" ] && [ -n "$PROMOTION_STAGING_DEV" ] && [ -n "$PROMOTION_STAGING_INO" ]; then
|
|
node scripts/cleanup-verified-promotion.ts
|
|
fi
|
|
|
|
deployment:
|
|
name: deploy-promoted-release
|
|
needs: [immutable_build, promotion]
|
|
if: ${{ gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'production' || inputs.stage == 'field') }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
outputs:
|
|
deployed: ${{ steps.deploy.outputs.deployed }}
|
|
steps:
|
|
- name: Deployment slot is empty
|
|
id: deploy
|
|
run: echo "deployed=false" >> "$GITHUB_OUTPUT"
|
|
|
|
production_gate:
|
|
name: "${{ matrix.gate }} / ${{ matrix.name }}"
|
|
needs: [immutable_build, promotion, deployment]
|
|
if: ${{ gitea.event_name == 'workflow_dispatch' && (inputs.stage == 'production' || inputs.stage == 'field') }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
HOSTING_BASE_URL: "${{ vars.HOSTING_BASE_URL }}"
|
|
CANDIDATE_ARCHIVE_SHA256: "${{ needs.immutable_build.outputs.archive_sha256 }}"
|
|
RELEASE_DEPLOYED: "${{ needs.deployment.outputs.deployed }}"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { gate: FE-GATE-019, name: hosting-header }
|
|
- { gate: FE-GATE-021, name: runbook-boot-config }
|
|
- { gate: FE-GATE-022, name: runbook-chunk-mismatch }
|
|
- { gate: FE-GATE-023, name: runbook-api-degradation }
|
|
- { gate: FE-GATE-024, name: runbook-telemetry }
|
|
- { gate: FE-GATE-025, name: runbook-release-rollback }
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Download promoted release
|
|
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
|
with:
|
|
name: "promoted-release-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
|
|
path: .release/promoted
|
|
- name: Verify and extract the candidate through one inode-bound operation
|
|
run: node scripts/verify-ci-candidate-archive.ts --archive ".release/promoted/release-candidate.tar.gz" --extract-to ".release/promoted-release"
|
|
- name: Run blocking gate
|
|
run: corepack pnpm ci:gate -- ${{ matrix.gate }}
|
|
- name: Upload production gate evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "${{ matrix.gate }}-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
field_gate:
|
|
name: "FE-GATE-018 / field-web-vitals"
|
|
needs: production_gate
|
|
if: ${{ gitea.event_name == 'workflow_dispatch' && inputs.stage == 'field' }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
FIELD_WEB_VITALS_INPUT: "${{ vars.FIELD_WEB_VITALS_INPUT }}"
|
|
MIN_ELIGIBLE_SAMPLES: "${{ vars.MIN_ELIGIBLE_SAMPLES }}"
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Run blocking gate
|
|
run: corepack pnpm ci:gate -- FE-GATE-018
|
|
- name: Upload field gate evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "FE-GATE-018-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
documentation_gate:
|
|
name: "FE-GATE-017 / diagram-review"
|
|
if: ${{ gitea.event_name == 'workflow_dispatch' && inputs.stage == 'documentation' }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: Run documentation gate
|
|
run: corepack pnpm ci:gate -- FE-GATE-017
|
|
- name: Upload documentation gate evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "FE-GATE-017-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|
|
|
|
main_gate:
|
|
name: "main / self-tests and removal drills"
|
|
if: ${{ (gitea.event_name == 'push' && startsWith(gitea.ref, 'refs/heads/')) || (gitea.event_name == 'workflow_dispatch' && inputs.stage == 'main') }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Frozen install
|
|
run: |
|
|
corepack enable
|
|
corepack pnpm install --frozen-lockfile --ignore-scripts
|
|
- name: "FE-GATE-029 / checker-self-tests"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-029
|
|
- name: "FE-GATE-030 / optional-removability"
|
|
if: ${{ !cancelled() }}
|
|
run: corepack pnpm ci:gate -- FE-GATE-030
|
|
- name: Upload main gate evidence
|
|
if: always()
|
|
uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
|
with:
|
|
name: "main-gate-${{ gitea.run_id }}"
|
|
path: artifacts/
|
|
if-no-files-found: error
|