encore de la doc ;-)
Some checks are pending
CI / yaml-lint (push) Waiting to run
CI / ssot-export (push) Waiting to run
CI / tests (push) Waiting to run
CI / docs (push) Waiting to run

This commit is contained in:
Dan Allaire 2025-10-20 13:45:11 -04:00
parent 0258fed608
commit ef6fdc570f
3 changed files with 1402 additions and 0 deletions

File diff suppressed because it is too large Load diff

146
polishPack.sh Executable file
View file

@ -0,0 +1,146 @@
#!/usr/bin/env bash
set -euo pipefail
cd ~/Alliance-Boreale
# 0) identité auteur (si besoin)
git config user.name "${GIT_USER_NAME:-Dan Allaire}"
git config user.email "${GIT_USER_EMAIL:-dan@chezlepro.ca}"
# 1) GOV/CONTRIB/SECURITY
cat > GOVERNANCE.md <<'MD'
# Gouvernance — Alliance Boréale
- Le présent dépôt fait foi. Toute évolution se fait par PR et revue.
- Décision: consensus simple; en cas dégalité, maintien du statu quo.
- Versions: tags `vYYYY.M` (ex: v2025.1) publiés après ratification.
- Sécurité: gestion PKI fédérative; rotation régulière; CRL partagées.
- Transversal: neutralité, interopérabilité, souveraineté, traçabilité.
MD
cat > CONTRIBUTING.md <<'MD'
# Contribuer
1. Fork/branche: `feat/...`, `fix/...`, `docs/...`.
2. Respecter la charte DNS/PKI et le plan IP v3.
3. Mettre à jour la doc (`docs/`) si comportement/standard change.
4. Lint YAML: `yamllint` (via CI), SSOT: `node configure/export.mjs`.
5. Tests: `node configure/tests/test.mjs`.
MD
cat > SECURITY.md <<'MD'
# Sécurité
- Signaler une vulnérabilité: ouvrir un ticket privé ou contacter léquipe sécurité.
- Secrets: jamais dans le dépôt; utiliser un coffre (ex: Vault).
- Certificats: autorité PKI fédérative + ACME si public.
- Rotation clés/certificats: semestrielle (au minimum).
MD
# 2) CODEOWNERS + templates (Forgejo lit .gitea/ aussi)
mkdir -p .gitea/ISSUE_TEMPLATE
cat > .gitea/CODEOWNERS <<'TXT'
# CODEOWNERS — réviseurs par défaut
* @danallaire
docs/** @danallaire
specs/** @danallaire
configure/** @danallaire
TXT
cat > .gitea/ISSUE_TEMPLATE/bug_report.md <<'MD'
---
name: Bug
about: Rapport de bogue
---
**Comportement attendu**
**Comportement observé**
**Reproduire**
1.
2.
3.
**Contexte** (OS, version, logs)
MD
cat > .gitea/ISSUE_TEMPLATE/feature_request.md <<'MD'
---
name: Demande de fonctionnalité
about: Proposition d'amélioration
---
**Problème à résoudre**
**Solution proposée**
**Impacts (doc, SSOT, CI)**
MD
cat > .gitea/pull_request_template.md <<'MD'
# Objet
- [ ] Code/Docs conformes aux standards (DNS/PKI, IP v3)
- [ ] SSOT export ok (`node configure/export.mjs`)
- [ ] Doc mise à jour
**Explication courte**
MD
# 3) Makefile utile
cat > Makefile <<'MK'
SHELL := /bin/bash
.PHONY: all ssot docs test release
all: ssot docs
ssot:
@node configure/export.mjs || (echo "Run: npm -C configure i"; exit 1)
@echo "✅ SSOT exports → ./out"
docs:
@mkdocs build --strict
@echo "✅ Docs build → site/"
test:
@node configure/tests/test.mjs
release:
@[ -n "$$V" ] || (echo "Usage: make release V=2025.1"; exit 1)
git tag -a "v$$V" -m "release v$$V"
git push origin "v$$V"
MK
# 4) CI : ajoute un job SSOT + tests (conserve lexistant)
cat > .forgejo/workflows/ci.yml <<'YML'
name: CI
on:
push: { branches: ["main"] }
pull_request:
jobs:
yaml-lint:
runs-on: docker
steps:
- uses: actions/checkout@v4
- name: yamllint
uses: ibiqlik/action-yamllint@v3
ssot-export:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: cd configure && npm ci || npm i
- run: node configure/export.mjs
tests:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: cd configure && npm ci || npm i
- run: node configure/tests/test.mjs
docs:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.11' }
- run: pip install mkdocs
- run: mkdocs build --strict
YML
# 5) commit(s) propres
git add GOVERNANCE.md CONTRIBUTING.md SECURITY.md .gitea Makefile .forgejo/workflows/ci.yml
git commit -m "gov/docs: constitution + règles de contribution/sécurité + CODEOWNERS + CI"
git push
echo "✅ Polish pack appliqué."