4digital.cloud4digital.cloud
← Engineering

Safe releases

Releases that match the approved version

In short: Release control compares the deployed version with the approved artefact. Build reproducibility rests on sources of non-determinism that were identified and removed, confirmed by specific trials.

01 / For your organisation

A green pipeline says the process finished, but not exactly what runs in production. During an incident, an audit or a rollback you need a certain answer: which version is deployed and whether it is the one that was approved.

Release control compares the deployment with the approved artefact, and build reproducibility lets you rebuild and check that artefact. Together they let you quickly establish what runs in production and return to a known version.

02 / Delivered in 4digital’s environment

In 4digital’s own environment — the websites, and a JVM library and service — both capabilities rest on comparing bytes, not on what the tools report:

  • A release is a version in the repository — the server can be compared with a specific commit, and a rollback is a deployment of the chosen commit.
  • Compare before overwriting — a deployment stops if the server does not match any known version.
  • Check after the release — production is compared file by file with the release build and with what was checked before production.
  • Reproducibility as a requirement — the same commit must produce the same bytes; any difference is an error to explain, not noise.

Release control. Release scripts run as a dry run by default, refuse to overwrite a version they did not deploy themselves, and roll a site back to a chosen commit with one command. After a release, a check compares the served files with the release build and with the version checked before production. When the JVM service is deployed, the artefact extracted from the container image is compared with the build.

Build reproducibility. In the JVM library I traced the causes of build differences to the bytes: the source path the compiler recorded in metadata, and timestamps, entry order and permissions in archives. The fixes became part of the build contract, and a verifier names the class of any divergence instead of requiring another binary analysis. An artefact that fails the comparison is not published.

03 / Outcome

The release process checks the candidate before publication and then compares the served files with it. Post-deployment verification detects discrepancies and supports a decision to correct or roll back the release. In the tested artefact registry, an attempt to overwrite a released version was rejected.

Build reproducibility is part of the build contract. I bring each new environment or module under the same measurement instead of assuming it matches.

Value: every deployment can be tied to an approved version and mismatches detected, and the websites can also return to a known state without guessing what was published before.

04 / Selected evidence

  • Website release verification: published files compared with the release build and the version checked before production.
  • A full-cycle trial: release, repeat with no changes, a further release and rollback to the previous version, with files verified byte for byte.
  • An attempt to overwrite a released version in the artefact registry was rejected, and a read afterwards returned the unchanged bytes.
  • The causes of JVM build differences traced to compiler and archive metadata; byte-for-byte identity of an artefact built on two independent hosts confirmed by trial.
  • The artefact extracted from the container image compared with the build before the service was deployed.
Source of experience
4digital’s own environment
Discipline
Releases and artefact integrity
Technology areas
CI/CD · Reproducible builds · Gradle and Scala 3 · Artefact registry · Containers · Release verification · Deployments with rollback