Validating an Artifact Before Release

A release check can inspect a built artifact, its provenance, and representative behavior before replacing what users receive.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Choose a representative test
  2. Keep release evidence
  3. Validate what will be moved into each environment
  4. Avoid testing one artifact and releasing another

Choose a representative test

If a command reads a UTF-8 file and writes CSV, exercise the packaged command with an accented value and a CSV field containing a comma. A consumer-boundary test checks the output rather than merely the build's exit status.

Keep release evidence

Record which package was checked so release automation supports the same artifact. Source branches and artifacts distinguish the mutable source name from that artifact identity.[1]

Validate what will be moved into each environment

A build may exit successfully after generating an archive that is missing its route manifest. Opening that exact archive in a clean environment tests the packaged contents. Validate required files, identifiers and a representative consumer operation. See checking a written file through its reader.

Compile succeeds
Identify exact archive and digest
Open archive in a clean target-like environment
Run a consumer smoke check before promoting that same artifact

Avoid testing one artifact and releasing another

Rebuilding after validation may create different outputs if inputs change. Carry an immutable reference through promotion and compare it at deployment. Test an artifact intentionally missing one required file.

References

  1. Free Software Foundation, GNU Make Manual ↩