Compare commits

...

8 Commits

Author SHA1 Message Date
David
f2b6782e5c ci: stop pipelines and alert Discord when the Security gate fails
Some checks failed
CD Preprod / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, backend) (push) Has been skipped
CD Preprod / Backend — Integration Tests (push) Has been skipped
CD Preprod / Build Backend (push) Has been skipped
CD Preprod / Build Frontend (push) Has been skipped
CD Preprod / Build Log Exporter (push) Has been skipped
CD Preprod / Backend — Lint (push) Has been skipped
CD Preprod / Frontend — Lint & Type-check (push) Has been skipped
CD Preprod / Backend — Unit Tests (push) Has been skipped
CD Preprod / Frontend — Unit Tests (push) Has been skipped
CD Preprod / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, frontend) (push) Has been skipped
CD Preprod / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, log-exporter) (push) Has been skipped
CD Preprod / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (arm64, backend) (push) Has been skipped
CD Preprod / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (arm64, frontend) (push) Has been skipped
CD Preprod / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (arm64, log-exporter) (push) Has been skipped
CD Preprod / Deploy to Preprod (push) Has been skipped
CD Preprod / Notify Success (push) Has been skipped
CD Preprod / Notify Failure (push) Has been skipped
CD Production / Security gate (push) Failing after 1m35s
CD Production / Backend — Tests unitaires (push) Has been skipped
CD Production / Frontend — Tests unitaires (push) Has been skipped
CD Production / Backend — Lint (push) Has been skipped
CD Production / Frontend — Lint & Type-check (push) Has been skipped
CD Production / Vérifier l'image de preprod (push) Has been skipped
CD Production / Reconstruire le frontend (URLs de production) (push) Has been skipped
CD Production / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, backend) (push) Has been skipped
CD Production / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, frontend) (push) Has been skipped
CD Production / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, log-exporter) (push) Has been skipped
CD Production / Déployer en production (push) Has been skipped
CD Production / Notifier le succès (push) Has been skipped
CD Production / Notifier l'échec (push) Has been skipped
Lint and unit-test jobs now depend on the Security gate, so a failure
stops every workflow (dev, preprod, main, PR checks) before anything else
runs. The security job posts its own Discord alert; the generic failure
notification skips that case to avoid duplicates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:51:05 +02:00
David
52307782a7 Merge branch 'dev'
Some checks failed
CD Production / Security gate (push) Failing after 1m35s
CD Production / Backend — Lint (push) Successful in 1m52s
CD Production / Frontend — Tests unitaires (push) Has been cancelled
CD Production / Vérifier l'image de preprod (push) Has been cancelled
CD Production / Reconstruire le frontend (URLs de production) (push) Has been cancelled
CD Production / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, backend) (push) Has been cancelled
CD Production / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, frontend) (push) Has been cancelled
CD Production / Image security (${{ matrix.service }}, ${{ matrix.arch }}) (amd64, log-exporter) (push) Has been cancelled
CD Production / Déployer en production (push) Has been cancelled
CD Production / Notifier le succès (push) Has been cancelled
CD Production / Notifier l'échec (push) Has been cancelled
CD Production / Backend — Tests unitaires (push) Has been cancelled
CD Production / Frontend — Lint & Type-check (push) Has been cancelled
2026-10-05 09:53:13 +02:00
David
5a54940424 chore: sync main with preprod (remove smoke tests + latest changes)
Some checks failed
CD Production / Backend — Lint (push) Successful in 10m22s
CD Production / Frontend — Lint & Type-check (push) Successful in 10m53s
CD Production / Backend — Unit Tests (push) Successful in 10m10s
CD Production / Frontend — Unit Tests (push) Successful in 10m30s
CD Production / Verify Preprod Image Exists (push) Failing after 9s
CD Production / Promote Images (preprod-SHA → prod) (push) Has been skipped
CD Production / Deploy to Production (k3s) (push) Has been skipped
CD Production / Notify Success (push) Has been skipped
CD Production / Notify Failure (push) Has been skipped
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:13:51 +02:00
David
ce8a1049dd fix(cicd): sync corrected pipelines from cicd branch
Some checks failed
CD Production / Frontend — Lint & Type-check (push) Failing after 6m11s
CD Production / Frontend — Unit Tests (push) Has been skipped
CD Production / Backend — Lint (push) Successful in 10m24s
CD Production / Backend — Unit Tests (push) Failing after 5m32s
CD Production / Verify Preprod Image Exists (push) Has been skipped
CD Production / Promote Images (preprod-SHA → prod) (push) Has been skipped
CD Production / Deploy to Production (k3s) (push) Has been skipped
CD Production / Smoke Tests (push) Has been skipped
CD Production / Notify Success (push) Has been skipped
CD Production / Notify Failure (push) Has been skipped
2026-04-04 13:16:48 +02:00
David
9c511c0619 revert: restore root-level docs mistakenly deleted
Some checks failed
CD Production (Hetzner k3s) / Promote Images (preprod → prod) (push) Successful in 31s
CD Production (Hetzner k3s) / Deploy to k3s (xpeditis-prod) (push) Has been cancelled
CD Production (Hetzner k3s) / Smoke Tests (push) Has been cancelled
CD Production (Hetzner k3s) / Deployment Summary (push) Has been cancelled
CD Production (Hetzner k3s) / Notify Success (push) Has been cancelled
CD Production (Hetzner k3s) / Notify Failure (push) Has been cancelled
2026-04-04 13:02:26 +02:00
David
9a79777e34 chore: remove stale root-level docs (already in docs/installation/)
Some checks are pending
CD Production (Hetzner k3s) / Promote Images (preprod → prod) (push) Waiting to run
CD Production (Hetzner k3s) / Deploy to k3s (xpeditis-prod) (push) Blocked by required conditions
CD Production (Hetzner k3s) / Smoke Tests (push) Blocked by required conditions
CD Production (Hetzner k3s) / Deployment Summary (push) Blocked by required conditions
CD Production (Hetzner k3s) / Notify Success (push) Blocked by required conditions
CD Production (Hetzner k3s) / Notify Failure (push) Blocked by required conditions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:58:28 +02:00
David
d65cb721b5 chore: sync full codebase from cicd branch
Some checks are pending
CD Production (Hetzner k3s) / Promote Images (preprod → prod) (push) Waiting to run
CD Production (Hetzner k3s) / Deploy to k3s (xpeditis-prod) (push) Blocked by required conditions
CD Production (Hetzner k3s) / Smoke Tests (push) Blocked by required conditions
CD Production (Hetzner k3s) / Deployment Summary (push) Blocked by required conditions
CD Production (Hetzner k3s) / Notify Success (push) Blocked by required conditions
CD Production (Hetzner k3s) / Notify Failure (push) Blocked by required conditions
Aligns main with the complete application codebase (cicd branch).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:56:44 +02:00
David
b7f85c9bf9 feat(cicd): sync CI/CD pipeline from cicd branch
Some checks failed
CD Production (Hetzner k3s) / Deployment Summary (push) Blocked by required conditions
CD Production (Hetzner k3s) / Notify Success (push) Blocked by required conditions
CD Production (Hetzner k3s) / Notify Failure (push) Blocked by required conditions
CD Production (Hetzner k3s) / Deploy to k3s (xpeditis-prod) (push) Blocked by required conditions
CD Production (Hetzner k3s) / Smoke Tests (push) Blocked by required conditions
Security Audit / npm audit (push) Failing after 7s
Security Audit / Dependency Review (push) Has been skipped
CD Production (Hetzner k3s) / Promote Images (preprod → prod) (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 12:52:56 +02:00
5 changed files with 84 additions and 5 deletions

View File

@ -0,0 +1,44 @@
name: Notify security gate failure
description: Posts a Discord alert when the Security gate fails and stops the pipeline.
inputs:
webhook-url:
description: Discord webhook URL.
required: true
pipeline:
description: Human-readable pipeline name shown in the alert.
required: true
runs:
using: composite
steps:
- name: Discord
shell: bash
env:
WEBHOOK_URL: ${{ inputs.webhook-url }}
PIPELINE: ${{ inputs.pipeline }}
REF_NAME: ${{ github.ref_name }}
ACTOR: ${{ github.actor }}
SHA: ${{ github.sha }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
# Payload built with json.dumps: branch or author names cannot break the JSON.
payload=$(python3 - <<'PY'
import json, os
print(json.dumps({
"content": "@here Security gate en échec — pipeline arrêté",
"embeds": [{
"title": f"🔒 Security gate en échec — {os.environ['PIPELINE']}",
"description": "Aucun lint, test, build ni déploiement n'a été lancé. Consultez l'artefact `security-reports`.",
"color": 15158332,
"fields": [
{"name": "Branche", "value": f"`{os.environ['REF_NAME']}`", "inline": True},
{"name": "Auteur", "value": os.environ["ACTOR"], "inline": True},
{"name": "Commit", "value": f"`{os.environ['SHA'][:7]}`", "inline": True},
{"name": "Workflow", "value": f"[Voir le run]({os.environ['RUN_URL']})", "inline": False},
],
"footer": {"text": f"Xpeditis CI/CD • {os.environ['PIPELINE']}"},
}],
}))
PY
)
curl -fsS --max-time 15 -H "Content-Type: application/json" -d "$payload" "$WEBHOOK_URL" \
|| echo "::warning::Notification Discord non envoyée."

View File

@ -2,7 +2,7 @@ name: CD Production
# Pipeline de production — Hetzner k3s (infra/prod/). # Pipeline de production — Hetzner k3s (infra/prod/).
# #
# Enchaînement : qualité → vérification → promotion/rebuild → déploiement → contrôle # Enchaînement : sécurité → qualité → vérification → promotion/rebuild → déploiement → contrôle
# #
# TROIS RÈGLES STRUCTURANTES # TROIS RÈGLES STRUCTURANTES
# #
@ -66,11 +66,18 @@ jobs:
path: ${{ runner.temp }}/security-reports/*.json path: ${{ runner.temp }}/security-reports/*.json
retention-days: 7 retention-days: 7
if-no-files-found: error if-no-files-found: error
- name: Notify Discord
if: failure()
uses: ./.gitea/actions/notify-security-failure
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
pipeline: Production
# ═══ 1. Qualité ══════════════════════════════════════════════════════════ # ═══ 1. Qualité ══════════════════════════════════════════════════════════
backend-quality: backend-quality:
name: Backend — Lint name: Backend — Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/backend working-directory: apps/backend
@ -85,6 +92,7 @@ jobs:
frontend-quality: frontend-quality:
name: Frontend — Lint & Type-check name: Frontend — Lint & Type-check
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/frontend working-directory: apps/frontend
@ -386,7 +394,8 @@ jobs:
name: Notifier l'échec name: Notifier l'échec
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [security, backend-quality, frontend-quality, backend-tests, frontend-tests, verify-image, build-frontend, image-security, deploy] needs: [security, backend-quality, frontend-quality, backend-tests, frontend-tests, verify-image, build-frontend, image-security, deploy]
if: failure() # Security gate failures are already reported by the security job itself.
if: failure() && needs.security.result != 'failure'
steps: steps:
- run: | - run: |
curl -sf -H "Content-Type: application/json" -d '{ curl -sf -H "Content-Type: application/json" -d '{

View File

@ -1,7 +1,7 @@
name: CD Preprod name: CD Preprod
# Full pipeline triggered on every push to preprod. # Full pipeline triggered on every push to preprod.
# Flow: lint → unit tests → integration tests → docker build → deploy → notify # Flow: security gate → lint → unit tests → integration tests → docker build → deploy → notify
# #
# Secrets required: # Secrets required:
# REGISTRY_TOKEN — Scaleway registry (read/write) # REGISTRY_TOKEN — Scaleway registry (read/write)
@ -55,11 +55,18 @@ jobs:
path: ${{ runner.temp }}/security-reports/*.json path: ${{ runner.temp }}/security-reports/*.json
retention-days: 7 retention-days: 7
if-no-files-found: error if-no-files-found: error
- name: Notify Discord
if: failure()
uses: ./.gitea/actions/notify-security-failure
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
pipeline: Preprod
# ── 1. Lint ───────────────────────────────────────────────────────── # ── 1. Lint ─────────────────────────────────────────────────────────
backend-quality: backend-quality:
name: Backend — Lint name: Backend — Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/backend working-directory: apps/backend
@ -74,6 +81,7 @@ jobs:
frontend-quality: frontend-quality:
name: Frontend — Lint & Type-check name: Frontend — Lint & Type-check
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/frontend working-directory: apps/frontend
@ -425,7 +433,8 @@ jobs:
name: Notify Failure name: Notify Failure
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [security, backend-quality, frontend-quality, backend-tests, frontend-tests, integration-tests, build-backend, build-frontend, build-log-exporter, image-security, deploy] needs: [security, backend-quality, frontend-quality, backend-tests, frontend-tests, integration-tests, build-backend, build-frontend, build-log-exporter, image-security, deploy]
if: failure() # Security gate failures are already reported by the security job itself.
if: failure() && needs.security.result != 'failure'
steps: steps:
- run: | - run: |
curl -s -H "Content-Type: application/json" -d '{ curl -s -H "Content-Type: application/json" -d '{

View File

@ -40,10 +40,17 @@ jobs:
path: ${{ runner.temp }}/security-reports/*.json path: ${{ runner.temp }}/security-reports/*.json
retention-days: 7 retention-days: 7
if-no-files-found: error if-no-files-found: error
- name: Notify Discord
if: failure()
uses: ./.gitea/actions/notify-security-failure
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
pipeline: Dev
backend-quality: backend-quality:
name: Backend — Lint name: Backend — Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/backend working-directory: apps/backend
@ -58,6 +65,7 @@ jobs:
frontend-quality: frontend-quality:
name: Frontend — Lint & Type-check name: Frontend — Lint & Type-check
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/frontend working-directory: apps/frontend
@ -104,7 +112,8 @@ jobs:
name: Notify Failure name: Notify Failure
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [security, backend-quality, frontend-quality, backend-tests, frontend-tests] needs: [security, backend-quality, frontend-quality, backend-tests, frontend-tests]
if: failure() # Security gate failures are already reported by the security job itself.
if: failure() && needs.security.result != 'failure'
steps: steps:
- name: Discord - name: Discord
run: | run: |

View File

@ -42,10 +42,17 @@ jobs:
path: ${{ runner.temp }}/security-reports/*.json path: ${{ runner.temp }}/security-reports/*.json
retention-days: 7 retention-days: 7
if-no-files-found: error if-no-files-found: error
- name: Notify Discord
if: failure()
uses: ./.gitea/actions/notify-security-failure
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
pipeline: PR Checks
backend-quality: backend-quality:
name: Backend — Lint name: Backend — Lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/backend working-directory: apps/backend
@ -60,6 +67,7 @@ jobs:
frontend-quality: frontend-quality:
name: Frontend — Lint & Type-check name: Frontend — Lint & Type-check
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: security
defaults: defaults:
run: run:
working-directory: apps/frontend working-directory: apps/frontend