Skip to content

Conventions ​

The pipeline ​

TopicConventionExample
Job names<part>:<step>api:test, web:build
Deployment job namesdeploy-<environment>deploy-prod
A part's jobsin its folder's .gitlab-ci.yml, included by the rootweb/.gitlab-ci.yml
Lint and testsrules: changes on the part's folderweb/**/*
Buildon every push to develop and main—
Images$CI_REGISTRY_IMAGE/<part>:$CI_COMMIT_SHORT_SHA…/api:5a86221
CI image versionsalways a precise versiondocker:27.5.1-dind, never docker:latest
ReportsJUnit and Cobertura, when: always—

Docker ​

  • Two Dockerfiles per application: Dockerfile.dev, Dockerfile.prod.
  • In prod: multi-stage, non-root user, HEALTHCHECK.
  • Comments explain why, in French.
  • No secret value in a Dockerfile or a Compose file: ${VARIABLE} only.

Ansible ​

  • One role per topic, with a tag of the same name.
  • Each task has a name saying what it does, in English.
  • Every task must be idempotent: re-running the playbook must not break or duplicate anything.
  • Secrets in vault.yml, tasks handling them with no_log: true.

Traefik ​

  • One route file per application and per server: dynamic/<env>/<application>.yml.
  • Routers and services prefixed with the environment: prod-web, dev-api.

The docs ​

  • Each part is written by its owner.
  • An infrastructure change is documented in the same merge request, in French and in English.
  • File excerpts are included (<<< or @include), never copied.

Git ​

Messages ci: …, chore(ansible): …, feat(infra): …, fix(traefik): …. See The Git repository.