33 Commits

Author SHA1 Message Date
Serreau Jovann
d5b08aaae2 Wrap deploy script in bash -c to bypass remote fish shell
Some checks failed
CI / sonarqube (push) Has been cancelled
Deploy to production / deploy (push) Failing after 40s
- .gitea/workflows/deploy.yml: the bot user on the new prod host has
  fish as its login shell, which rejects bash syntax (set -e, VAR=...,
  $(...), trap, process substitution). Wrap the entire deploy script
  in `bash -c '...'` so fish only spawns a bash subprocess and the
  script itself is parsed by bash.
- Forward DEPLOY_PATH alongside VAULT_PASS through appleboy/ssh-action
  envs: so the bash subprocess inherits both, instead of interpolating
  the secret directly into the rendered script (where masking would
  collide with the cd argument).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 18:08:30 +02:00
Serreau Jovann
c6d2c068d3 Pass ansible vault password via env var instead of process substitution
Some checks failed
CI / sonarqube (push) Has been cancelled
- .gitea/workflows/deploy.yml: stop interpolating ANSIBLE_VAULT_PASSWORD
  directly into the remote script (the runner masks the secret with ***
  which broke the <(echo '...') process substitution at runtime)
- inject the password as VAULT_PASS through appleboy/ssh-action's
  envs: forwarding so it never appears in the rendered script
- on the remote, write it to a mktemp file with chmod 600 and remove
  the file via trap on EXIT, then point ansible-playbook
  --vault-password-file at that temp file
- use printf '%s' instead of echo to avoid adding a stray newline to
  the vault password
- add set -e so the script fails fast if any step errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 18:04:50 +02:00
Serreau Jovann
5449ab9d4d Migrate deploy workflow to appleboy/ssh-action
Some checks failed
CI / sonarqube (push) Has been cancelled
- .gitea/workflows/deploy.yml: replace manual ssh key setup + raw ssh
  command with the appleboy/ssh-action@v1.0.0 action
- host, user, key and deploy path are now read from Gitea secrets
  (SSH_HOST, SSH_USER, SSH_PRIVATE_KEY, DEPLOY_PATH) instead of being
  hard-coded in the workflow
- ansible-playbook command and vault password file (process substitution
  fed by ANSIBLE_VAULT_PASSWORD) are kept identical, only the transport
  changes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 18:01:58 +02:00
Serreau Jovann
92548920c2 Migrate SonarQube to sn.e-cosplay.fr, rotate badge token, drop OWASP Dependency-Check, update deploy host
Some checks failed
CI / sonarqube (push) Failing after 5m27s
- .env, .env.test, ansible/env.local.j2: point SONARQUBE_URL to https://sn.e-cosplay.fr
- ansible/vault.yml, .env: rotate sonarqube_badge_token to new value
- .gitea/workflows/ci.yml, sonarqube.yml: remove OWASP Dependency-Check steps and force sonar.host.url via CLI args
- sonar-project.properties: drop dependencyCheck report paths
- .gitea/workflows/deploy.yml: switch SSH target from 34.90.187.4 to 152.228.222.133

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:44:37 +02:00
Serreau Jovann
3468b1288d Improve mobile/tablet responsive, fix structured data, update deploy schedule and fix HTML issues
- Add responsive breakpoints (sm/md) to event_detail.html.twig: adaptive titles, stacked ticket layout on mobile, reduced padding/spacing
- Add responsive breakpoints to order templates (guest, summary, public, payment, success): adaptive typography, padding, and layouts
- Fix BreadcrumbList JSON-LD: escape names with json_encode, remove item URL from last breadcrumb
- Update deploy.yml cron schedule from 3h/13h/19h/23h to 1h/22h
- Add <title> tags to rgpd_deletion.html.twig and rgpd_access.html.twig
- Add scope attributes to all <th> tags in rgpd_access.html.twig
- Replace deprecated width/cellpadding/cellspacing HTML attributes with CSS in scan_force_notification email

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 08:40:28 +02:00
Serreau Jovann
300e7f0be9 Add scheduled auto-deploy at 3h, 13h, 19h, 23h daily
Also rotates SECRET_ANALYTICS at each deploy for dynamic endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 12:27:35 +01:00
Serreau Jovann
ddc49e49a7 Add npm install for OWASP Dependency-Check compatibility
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:38:15 +01:00
Serreau Jovann
93d8cb3b0f Add NVD API key to OWASP Dependency-Check via secret
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:35:33 +01:00
Serreau Jovann
373fdfd138 aa 2026-03-21 13:24:33 +01:00
Serreau Jovann
a4c048a6eb Remove dependency caching from CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:23:15 +01:00
Serreau Jovann
c178fb1154 Add Composer and Bun dependency caching to CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:18:47 +01:00
Serreau Jovann
cddc784c13 Consolidate CI into single sonarqube job with all checks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:17:40 +01:00
Serreau Jovann
259a17c788 Simplify deploy workflow: SSH into server and run Ansible locally
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:23:19 +01:00
Serreau Jovann
7cce3a2999 Add OWASP Dependency-Check integration for SonarQube
- Add sonar.dependencyCheck.jsonReportPath and htmlReportPath to sonar-project.properties
- Add Dependency-Check action scanning composer.lock and package.json
- Generate JSON and HTML reports for SonarQube analysis
- Add to ci.yml sonarqube job and sonarqube.yml workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:41:25 +01:00
Serreau Jovann
7474ada434 Add ESLint and Hadolint reports for SonarQube analysis
- Add sonar.eslint.reportPaths and sonar.docker.hadolint.reportPaths
- Generate ESLint JSON report in CI frontend and sonarqube jobs
- Generate Hadolint JSON reports for dev and prod Dockerfiles
- Add reports to ci.yml and sonarqube.yml workflows

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:40:08 +01:00
Serreau Jovann
8275e65eb9 Add PHPStan report for SonarQube analysis
- Add sonar.php.phpstan.reportPaths to sonar-project.properties
- Generate phpstan-report.json in CI php job, sonarqube job, and sonarqube.yml workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:38:29 +01:00
Serreau Jovann
df7680d938 Add admin panel, Meilisearch buyer search, email redesign, and multiple features
Admin panel (/admin, ROLE_ROOT):
- Dashboard with CA HT Global/Commission cards and Meilisearch sync button
- Buyers page with search (Meilisearch), create form, pagination (KnpPaginator)
- Buyer actions: resend verification, force verify, reset password, delete
- Organizers page with tabs (pending/approved), approve/reject with emails
- Neo-brutalist design matching main site theme
- Vite admin entry point with dedicated SCSS
- CSP-compatible confirm dialogs via data-confirm attributes

Meilisearch integration:
- Auto-index buyers on email verification
- Remove from index on buyer deletion
- Manual sync button on dashboard
- Search bar on buyers page
- Add Meilisearch service to CI/SonarQube workflows
- Add MEILISEARCH env vars to .env.test
- Fix MeilisearchMessageHandler infinite loop: use request() directly instead
  of service methods that re-dispatch messages

Email templates:
- Redesign base email template to neo-brutalist style (borders, shadows, yellow footer)
- Add E-Cosplay logo, "E-Ticket solution proposee par e-cosplay.fr"
- Add admin_reset_password, organizer_approved, organizer_rejected templates

Other:
- Install knplabs/knp-paginator-bundle
- Add ^/admin access_control for ROLE_ROOT in security.yaml
- Update site footer with E-Ticket branding
- 18 admin tests, updated MeilisearchMessageHandler tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:07:07 +01:00
Serreau Jovann
9a8255a4ba Add JS test coverage to SonarQube job in CI workflow
- Add Node.js and Bun setup steps to the sonarqube job
- Install JS dependencies and run bun test:coverage before SonarQube scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 08:57:32 +01:00
Serreau Jovann
922e8c5e02 Add JS tests, refactor SitemapController, extract JS modules
- Extract mobile-menu.js and tabs.js from app.js
- Add Vitest tests with happy-dom and v8 coverage (100% on modules)
- Add JS test step to CI frontend and SonarQube workflows
- SonarQube: add JS lcov coverage report path
- SitemapController: extract URLSET_TEMPLATE constant, deduplicate methods

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:19:34 +01:00
Serreau Jovann
fd918c0323 Add manual SonarQube full scan workflow
- Manual trigger only (workflow_dispatch)
- Full pipeline: bun install, bun build, PHPUnit with coverage
- Force SonarQube to re-analyze all files (forceReloadAll)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:15:10 +01:00
Serreau Jovann
6bbfe28c05 Fix CI: downgrade setup-bun to v1, fix test database name
- setup-bun v2 uses node24, downgrade to v1 (node20 compat)
- DB name e_ticket + Symfony _test suffix = e_ticket_test
- Add doctrine:database:create before schema:create

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 23:00:43 +01:00
Serreau Jovann
89f74de702 Add missing templates, add PostgreSQL and Redis services to CI
- Create 13 missing Twig templates (account, security, legal, unsubscribe, pages)
- CI: add PostgreSQL and Redis service containers for php and sonarqube jobs
- CI: create database schema before running tests
- Use null mailer in test environment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:57:38 +01:00
Serreau Jovann
2d90440692 Run SonarQube only after php and frontend jobs succeed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:54:34 +01:00
Serreau Jovann
dc21c6a738 Consolidate CI: merge jobs, add coverage to SonarQube
- Merge lint, quality-php, security, test into single php job
- Merge quality-frontend and build into single frontend job
- SonarQube: generate coverage.xml before scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:53:47 +01:00
Serreau Jovann
dc3d464b17 Add PHPUnit tests with coverage for all src classes
- 21 test files covering controllers, services, entities, enums, messages
- CI: add test job with Xdebug coverage (clover + text)
- SonarQube: configure coverage report path and test sources

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:50:23 +01:00
Serreau Jovann
d13e9b6b80 Downgrade setup-node to v3 for Gitea runner compat (node20)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:45:21 +01:00
Serreau Jovann
7a2f54a491 Add Node.js 22 setup in CI for frontend jobs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:40:43 +01:00
Serreau Jovann
12344fe33d Add SonarQube scan to CI pipeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:21:07 +01:00
Serreau Jovann
160369f0f6 Add CI pipeline, Meilisearch service, CacheService and code quality tools
- CI: lint, PHPStan, PHP CS Fixer, ESLint, Stylelint, security audit, build
- MeilisearchService: async via Messenger, sync search
- MeilisearchMessage + handler for async operations
- CacheService with CacheKey enum (TTL per key, remember pattern)
- Meilisearch env vars in .env.local, vault and env.local.j2
- Messenger routing for MeilisearchMessage
- PHPStan level 6, ESLint, Stylelint configs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:08:54 +01:00
Serreau Jovann
46a84a9f9a Merge deploy playbooks, add env.local template, update MailerService
- Fuse deploy-caddy.yml and cloudflare.yml into deploy.yml
- Add env.local.j2 template for production secrets
- Vault: add all production secrets
- Workflow: single deploy.yml playbook
- MailerService: rewrite with S/MIME signing, email tracking, unsubscribe
- ngrok-sync: run as root for .env.local write access
- Fix domain references to ticket.e-cosplay.fr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:24:31 +01:00
Serreau Jovann
e3de0da1bf Add Cloudflare automation, ngrok tunnel, fix Dockerfiles
- Ansible cloudflare.yml: DNS, SSL, HSTS, Brotli, bot fight, SEO bots allow
- Vault: add cloudflare_zone_id
- Workflow: run cloudflare config before deploy
- docker-compose-dev: add ngrok tunnel, vault, minio
- Ngrok sync script: writes OUTSIDE_URL to .env.local
- Fix Dockerfiles: remove mbstring/xml (built-in PHP 8.4), fix libfreetype-dev
- Makefile: maintenance_on/off, clear_prod
- Playbook: stop_prod, install_prod, start_prod, migrate, clear steps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:06:11 +01:00
Serreau Jovann
507500e20d Update deployment pipeline, Makefile and README
- Makefile: add install_dev, install_prod, migrations, clear_prod, maintenance commands
- Playbook: full deploy flow (maintenance, stop, install, start, migrate, clear, caddy, messenger)
- Supervisor config for 2 messenger instances
- Workflow: SSH key setup with server IP
- hosts.ini: use IP instead of domain, sudo without password
- README: full documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:52:01 +01:00
Serreau Jovann
f822a9a069 Add deployment pipeline, maintenance page and project config
- Makefile: install_dev, install_prod, migration/migrate commands
- docker-compose-dev: add Caddy and Bun services
- docker-compose-prod: remove exposed pgbouncer port
- Ansible: Caddy template with maintenance mode (503), vault, deploy playbook
- Gitea workflow: manual deploy to production
- Maintenance page (Neubrutalism style)
- LICENSE: proprietary license

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 20:40:40 +01:00