Source Branches and Built Artifacts

A branch names a changing source tip. A release artifact should be identifiable by the inputs from which it was produced.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace two builds of one branch
  2. Keep the artifact link precise
  3. Record immutable evidence from checkout through publication
  4. Verify the identity at the receiving environment

Trace two builds of one branch

A branch may point to commit A on Monday and B on Tuesday. A package built from A does not change when the branch moves. A branch reference is therefore insufficient as the package's only source identity.

Keep the artifact link precise

Record the source commit and package version and optionally a digest of the packaged bytes. Tags and release names provide durable source markers when managed as release identities.[1]

Record immutable evidence from checkout through publication

A build for a moving branch may begin at commit C and finish after the branch advances to D. The resulting bytes belong to the checkout of C. Associate the artifact with the full revision, build configuration and an output digest. See connecting a deployment to a commit.

Branch at job start: C
Checkout and build: C
Branch later: D
Artifact metadata: source C and digest H

Verify the identity at the receiving environment

Deployment can select an older artifact after a new build completes. Compare the intended digest or immutable version with runtime evidence. Use a smoke check that exercises the concrete change users expect to see.

References

  1. Free Software Foundation, GNU Make Manual ↩