Skip to content

Commit 4800f08

Browse files
committed
feat(diagrams): automate generation, svg previews, firewall variant and flavor linting fixes
1 parent a98d6d7 commit 4800f08

83 files changed

Lines changed: 4828 additions & 389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/mermaid-config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"securityLevel": "loose",
3+
"maxTextSize": 200000000,
4+
"maxEdges": 20000,
5+
"flowchart": {
6+
"htmlLabels": true
7+
}
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"args": [
3+
"--no-sandbox",
4+
"--disable-setuid-sandbox"
5+
]
6+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Generate Architecture Diagrams
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- "src/**"
8+
- "modules/**"
9+
- "assets/**"
10+
- "docs/scripts/generate_example_architecture.py"
11+
- "docs/diagram-generation.md"
12+
push:
13+
branches:
14+
- main
15+
paths:
16+
- "src/**"
17+
- "modules/**"
18+
- "assets/**"
19+
- "docs/scripts/generate_example_architecture.py"
20+
- "docs/diagram-generation.md"
21+
22+
permissions:
23+
contents: write
24+
25+
jobs:
26+
generate-diagrams:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: "3.13"
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: "20"
42+
43+
- name: Install Mermaid CLI
44+
run: npm install -g @mermaid-js/mermaid-cli
45+
46+
- name: Generate architecture diagrams
47+
run: python3 docs/scripts/generate_example_architecture.py --out-dir docs/diagrams
48+
49+
- name: Render Mermaid SVG diagrams
50+
run: |
51+
for diagram in docs/diagrams/*.mmd; do
52+
output="${diagram%.mmd}.svg"
53+
mmdc -i "$diagram" -o "$output" -c .github/mermaid-config.json -p .github/mermaid-puppeteer-config.json
54+
done
55+
56+
- name: Verify generated diagrams are committed (PR)
57+
if: github.event_name == 'pull_request'
58+
run: |
59+
if [[ -n "$(git status --porcelain -- docs/diagrams)" ]]; then
60+
echo "::error::Generated diagrams are out of date. Run the generator locally and commit the changes."
61+
git status --short -- docs/diagrams
62+
exit 1
63+
fi
64+
65+
- name: Commit updated diagrams (main)
66+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor != 'github-actions[bot]'
67+
uses: stefanzweifel/git-auto-commit-action@v5
68+
with:
69+
commit_message: "chore(diagrams): regenerate architecture diagrams"
70+
file_pattern: docs/diagrams/*.mmd docs/diagrams/*.mmd.md docs/diagrams/*.svg

.github/workflows/tflint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838

3939
# runs 6h
4040
# - name: Validate STACKIT flavors (live)
41-
# run: python3 scripts/validate_stackit_flavors.py
41+
# run: python3 docs/scripts/validate_stackit_flavors.py

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,10 @@ override.tf.json
3636
.terraformrc
3737
terraform.rc
3838

39-
.terraform.lock.hcl
39+
.terraform.lock.hcl
40+
41+
# Local AI/model-serving credentials and generated semantic cache
42+
openai.token
43+
.env
44+
.env.local
45+
.cache/

0 commit comments

Comments
 (0)