Commit Graph
26 Commits
Author SHA1 Message Date
Arnaud Dartois ec4deeaf9f chore(ci): add workflow_dispatch trigger for manual CI runs 2026-07-25 18:38:52 +00:00
Arnaud Dartois 920722544b fix(ci): push Docker images to eltruncho instead of nonobis
The docker-compose.prod.yml pulls from eltruncho/heimdall but the CI
was pushing to nonobis/heimdall. Fix the docker-images config in both
ci.yml and release.yml to match the deployment target.
2026-07-25 16:26:24 +00:00
Arnaud Dartois adbc38fa75 fix(ci): remove sudo commands from disk cleanup 2026-07-24 16:51:53 +00:00
Arnaud Dartois 3cef2ab3d7 chore(ci): add aggressive disk cleanup to prevent runner OOM
The CI runner was failing at 100% disk capacity (67G/69G) during
coverage report generation. Add two cleanup steps:
1. Aggressive cleanup before CI execution (removes unnecessary
   packages, Docker images, caches)
2. Cleanup after CI before coverage report (removes build
   artifacts, test results)
2026-07-24 14:36:53 +00:00
Arnaud Dartois 9df02856ad ci: enable bunit-enabled for Blazor component tests 2026-07-23 20:26:35 +00:00
Arnaud Dartois 55f01cb922 ci: add explicit Web.Tests (bUnit) step to CI pipeline 2026-07-23 19:52:16 +00:00
Arnaud Dartois 71a9145cf5 refactor(ci): use docker-images list (image + dockerfile per line) 2026-07-22 14:41:21 +00:00
Arnaud Dartois ff65c73724 refactor(ci): use ci-full mega-action (identical across all projects)
All 3 projects now share the exact same CI pipeline via
nonobis/templates/.forgejo/actions/ci-full. Only params differ.
2026-07-22 13:52:59 +00:00
Arnaud Dartois ef2f3886e3 fix(tests): use Coverlet msbuild props instead of --collect (quoting issue)
Vault auth now working! Tests failed due to bad --collect quoting.
Switched to -p:CollectCoverage=true (Cleaner syntax).
2026-07-22 13:48:29 +00:00
Arnaud Dartois 29eecf869b fix(ci): sonar secrets from Vault env (not forgejo secrets) 2026-07-22 11:14:26 +00:00
Arnaud Dartois f88d9e52d6 fix(ci): enable Vault (VAULT_URL=https://vault.tordais.cc) 2026-07-22 10:28:46 +00:00
Arnaud Dartois 4364578de1 fix(ci): Vault is mandatory — no fallback to Forgejo secrets
- enable-openid-connect: true
- Vault steps sont OBLIGATOIRES si VAULT_URL défini
- fallback: 'false' sur vault-auth + vault-secrets
- Docker push utilise uniquement env vars Vault (plus secrets.*)
2026-07-22 09:37:32 +00:00
Arnaud Dartois 923bc196a0 feat(ci): add Vault OIDC auth with fallback to Forgejo secrets
- Vault auth via OIDC JWT (enable-openid-connect)
- Fallback silencieux si Vault pas dispo
- VAULT_URL à renseigner dans les env du workflow
- TEMPLATES_PAT reste seul secret Forgejo nécessaire
2026-07-22 09:35:52 +00:00
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