A useful delivery pipeline answers three questions: what changed, what was tested, and who authorized the release. The same record should help the next engineer understand an incident or repeat a deployment.

Our starting point is a five-stage flow: review, test, build, stage and release. The details depend on the application, but the handover between stages should be explicit.

Start with a reviewed change

Keep the application configuration and deployment definition in version control. A merge request should explain the change, the checks performed and any operational impact. Include database migrations, new environment variables and required maintenance in that review.

The pipeline should run the checks that matter for the application. A passing build does not demonstrate that a database migration works or that the application can reach its dependencies.

Build once, then promote the tested image

Publish a versioned container image to the registry and record the commit that produced it. GitLab documents commit-based tags and warns against building directly to a shared latest tag when concurrent jobs can overwrite it. See GitLab’s image build guidance.

For the service design shown on this site, staging and production use the same recorded image digest. Rebuilding for production would introduce a second artifact that has not passed the staging checks. Keep environment-specific secrets outside the image.

Test the release in staging

Check startup, database connectivity and a representative user journey. If the release changes data, rehearse the migration and measure its duration. Document which steps can be reversed and which require a separate recovery procedure.

Example release record: commit SHA, image digest, migration result, smoke-test result, release owner and previous working version. This is an operating checklist, not a complete pipeline configuration.

Make production authorization deliberate

Use an explicitly authorized production job and restrict deployment credentials. GitLab protected environments can limit who may deploy; their availability depends on the GitLab tier. Confirm the controls your installation supports before designing the approval flow. See GitLab protected environments.

After deployment, verify service health and the user journey again. Decide in advance what evidence would stop a release. Restoring a previous container image may be straightforward; reversing a database change often needs its own plan.

What we take responsibility for

We scope repository rules, runner setup, registry access, secrets, deployment jobs and operational checks together. Docker Compose and Kubernetes are deployment options; the choice follows the workload and the team’s ability to operate it. Runner hosting, licences and ongoing maintenance are agreed separately.