Skip to content

From a commit to prod ​

The full path of a change, from your machine to the users. Only two actions are human: merging into develop, then merging into main.

Step by step ​

#WhoWhatWhat happensWhere to look
1youpush to feature/x*:lint and *:test of the changed partBuild → Pipelines
2youmerge request to developthe pipeline and tests show in the MRthe MR
3a reviewermergesdevelop pipeline: lint, tests, image build, deploy-devOperate → Environments → dev
4youcheck on https://dev.trinity.jostud.com—the dev site
5youmerge request develop → main—the MR
6a reviewermergesmain pipeline: lint, tests, build, deploy-prod with zero downtimeOperate → Environments → prod

How long? A few minutes per pipeline: the longest jobs are the image builds.

How to know what is in prod ​

  • Operate → Environments → prod: the latest deployment and its commit.
  • On the server: docker service ls shows each service's image, hence its SHA.

Rolling back ​

Three ways, from simplest to most manual:

MethodWhen
Nothing to dothe new version fails its health check: Swarm goes back to the old one on its own
Operate → Environments → prod → Re-deploy on an older deploymentthe new version passes the health check but has a bug
git revert the faulty commit, then merge request up to mainso the fix stays in the history

The details are in If the site goes down.

A rollback does not undo a migration

See Database.