CI/CD — Stratégies, pipelines & GitLab CI
Stratégies (trunk/feature flags, GitOps), design pipelines (DAG, cache, artefacts), qualité (tests/coverage/gates), GitLab CI avancé (runners, rules, matrices, child pipelines), sécurité (SAST/DAST/SCA/SBOM), releases (semver/changelog), performance & coûts, troubleshooting.
Stratégies Design Pipeline Qualité & Tests GitLab CI Avancé DevSecOps Releases Perf & Coûts Troubleshooting
Cheat-sheet — objectif → features GitLab → snippets → KPIs → guardrails
| Objectif | Features GitLab | Snippets | KPIs | Guardrails |
|---|---|---|---|---|
| Feedback rapide | DAG needs, cache, tests parallèles | parallel: 4, needs: [], cache npm/pip | Durée CI < 10 min, succès > 90% | Interruption interruptible: true, auto-cancel redondant |
| Qualité | Reports JUnit, cobertura, codequality | artifacts:reports:junit | Coverage > 80%, flakies ↓ | Quarantaine tests instables |
| Sécurité | SAST/DAST/SCA, License, Secret scan | jobs “Security” + SBOM/sign | Critiques=0 en prod | Gates PR, exceptions datées |
| Déploiement fiable | Environments, resource_group, canary | on_stop, manual, approvals | Rollback < 10 min | Prod sérialisé, GitOps |
| Scalabilité | Runners autoscalés, matrices | parallel:matrix | Throughput ↑ | Quotas minutes & tags |
Mesures cœur : DORA (fréquence, lead-time, MTTR, % échec change), coût/minute CI, “Time-to-First-Deploy”.
