Commit Graph
13 Commits
Author SHA1 Message Date
Arnaud Dartois 6d075e37a4 feat(ci): unified pipeline with all features (coverage, sonar, e2e, trivy, gitversion, cleanup)
All features controlled by env vars. Same structure across all projects.
2026-07-22 09:15:16 +00:00
Arnaud Dartois e4d6d22e31 fix(ci): checkout templates via PAT + composite actions
Forgejo ne supporte pas le workflow_call cross-repo privé.
Solution: checkout du repo templates via PAT (secret TEMPLATES_PAT)
+ utilisation des actions composites depuis .ci/.forgejo/actions/

Le PAT doit être configuré dans Settings → Actions → Secrets → TEMPLATES_PAT
2026-07-22 08:52:08 +00:00
Arnaud Dartois d1c98bb7e2 fix: use remote nonobis/templates workflow_call (submodule not supported by Forgejo Actions)
- Remove .forgejo/templates submodule (incompatible with workflow_call resolution)
- Use remote uses: nonobis/templates/.forgejo/workflows/dotnet-ci.yml@main
- Update opencode submodule with cicd-pipeline skill update
2026-07-22 08:24:13 +00:00
Arnaud Dartois 1ffa5de28c fix: add ./ prefix to local workflow_call path (Forgejo requirement) 2026-07-22 08:11:49 +00:00
Arnaud Dartois d4981eda17 feat: migrate CI to shared templates submodule
- Add .forgejo/templates submodule (nonobis/templates)
- Replace 187-line CI with 41-line workflow_call using dotnet-ci.yml
- All patterns (PostgreSQL LXC, Docker multi-image, coverage, cleanup)
  now come from shared templates
- CI size reduction: -78%
2026-07-22 08:08:31 +00:00
Arnaud Dartois b727e5b672 fix(ci): add disk cleanup, replace sudo with su for LXC runner
LXC runner lacks sudo — use su - postgres instead.
Runner disks accumulate Docker images and temp files from prior CI
runs. Add pre-build and post-build cleanup steps (docker system prune,
apt-get clean, rm -rf /tmp /var/tmp) to both build-and-test and
docker-build jobs, with if: always() on post steps.
2026-07-22 07:20:22 +00:00
Arnaud Dartois 716eaf0470 fix(ci): store postgres data on tmpfs to avoid LXC disk limits
The LXC runner has very limited disk space. PostgreSQL's EnsureCreated()
and Migrate() calls in tests create table files per test class, quickly
exhausting the available space with "No space left on device" errors.

Move PostgreSQL data directory to /dev/shm (tmpfs backed by RAM) so
table creation during tests uses memory instead of disk. Use direct
initdb/pg_ctl binary paths instead of pg_ctlcluster to control data
location precisely.
2026-07-21 21:00:50 +00:00
Arnaud Dartois 4d79f416a7 fix(ci): replace postgres service with apt-get for LXC runner
The Forgejo runner uses a Debian 12 LXC auto-scaler that does not
support Docker service containers. PostgreSQL was defined as a
services container in ci.yml but never started, causing all
DB-dependent tests to fail with "Connection refused to 127.0.0.1:5432".

Remove the services section and add a Start PostgreSQL step that
installs PostgreSQL via apt-get, configures pg_hba.conf for password
auth, starts the cluster, creates the heimdall user and database, and
verifies connectivity with pg_isready.
2026-07-21 20:08:55 +00:00
Arnaud Dartois 8085df1aa0 fix(ci): update Dockerfile path after worker merge
Dockerfile.central was renamed to Dockerfile. Also update image name
from heimdall/web to heimdall to match the new single-image naming.
2026-07-20 18:15:53 +00:00
Arnaud Dartois 562aabdfc8 feat(api+web): merge REST API and Blazor UI into single process
Previously the API (heimdall-central) and Blazor UI (heimdall-web) ran as
separate containers with the Blazor Server making internal HTTP calls to
the API. This caused the Blazor circuit to disconnect when the API was
unreachable (network error → "Une erreur réseau est survenue").

Now both serve from the same .NET process on the same port:
- All 16 API controllers, ExceptionFilter, and SignalR hubs integrated
  into Heimdall.Web
- JWT auth, CORS, rate limiting configured in the unified Program.cs
- Dockerfile.central entrypoint runs web/Heimdall.Web.dll
- docker-compose simplified: heimdall-central service removed
- CI publishes heimdall-web image instead of heimdall-central

Also fixes timezone validation on Alpine/tzdata-less environments
and enables FluentValidation auto-validation in the API project.
2026-07-20 10:30:01 +00:00
Arnaud Dartois e85c5fff3f chore(ci): add Docker Hub publish steps to pipeline 2026-07-18 11:27:43 +00:00
Arnaud Dartois 62798cf81f chore: migrate CI from GitHub Actions to Forgejo
Replace .github/workflows/ci.yml with .forgejo/workflows/ci.yml:
- runs-on: ubuntu-latest → debian-12
- actions/ URL shortcuts → https://forgejo.tordais.cc/actions/... FQDNs
- docker/setup-buildx-action + docker/build-push-action → manual
  docker build
- Add NuGet package caching
- Add concurrency group (forgejo.ref) + paths-ignore
- Use forgejo.ref instead of github.ref
2026-07-17 17:39:22 +00:00
Arnaud Dartois 1203c7f0e1 fix(api): register-admin uses IAuthService instead of direct Entity creation
- Add RegisterAdminAsync to IAuthService interface
- Implement in AuthService (creates user + assigns Admin role)
- AuthController.register-admin now delegates to service layer
- No more 'new AppUser' in controller
2026-07-17 17:37:52 +00:00