Skip to content

Commit d38bff7

Browse files
committed
feat: wire conflow config validation pipeline
1 parent cf92d2c commit d38bff7

4 files changed

Lines changed: 84 additions & 0 deletions

File tree

.conflow.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# conflow pipeline - Full generate → validate → export
2+
version: "1"
3+
name: "game-server-admin"
4+
5+
stages:
6+
- name: "generate"
7+
description: "Generate configuration using Nickel"
8+
tool:
9+
type: nickel
10+
command: export
11+
file: configs/config.ncl
12+
format: json
13+
input: "configs/config.ncl"
14+
output: generated/config.json
15+
16+
- name: "validate"
17+
description: "Validate against CUE schema"
18+
tool:
19+
type: cue
20+
command: vet
21+
schemas:
22+
- schemas/config.cue
23+
input:
24+
from_stage: generate
25+
depends_on:
26+
- generate
27+
28+
- name: "export"
29+
description: "Export final configuration as YAML"
30+
tool:
31+
type: cue
32+
command: export
33+
out_format: yaml
34+
input:
35+
from_stage: generate
36+
output: deploy/config.yaml
37+
depends_on:
38+
- validate

configs/config.ncl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Configuration generation
2+
{
3+
name = "my-app",
4+
replicas =
5+
let env = "dev" in
6+
if env == "prod" then 5
7+
else if env == "staging" then 3
8+
else 1,
9+
port = 8080,
10+
env = "dev",
11+
}

schemas/config.cue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Configuration schema
2+
package config
3+
4+
#Config: {
5+
name: string
6+
replicas: int & >=1
7+
port: int & >=1 & <=65535
8+
env: string
9+
}

wokelangiser.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# wokelangiser manifest for game-server-admin
3+
4+
[project]
5+
name = "game-server-admin"
6+
7+
[consent]
8+
gdpr = true
9+
ccpa = true
10+
default-state = "opt-out"
11+
categories = ["functional", "analytics"]
12+
13+
[accessibility]
14+
wcag-level = "AA"
15+
check-contrast = true
16+
check-alt-text = true
17+
check-aria = true
18+
min-contrast-ratio = 4.5
19+
20+
[i18n]
21+
default-locale = "en-GB"
22+
supported-locales = ["en-GB", "fr-FR", "de-DE"]
23+
extract-strings = true
24+
25+
[report]
26+
format = "text"

0 commit comments

Comments
 (0)