Add unique per-build image tags via generate-tags task#317
Open
dandersonsw wants to merge 1 commit into
Open
Conversation
Introduce a generate-tags task that produces immutable, traceable image
tags in place of the standalone short_ref tag, which was not unique per
build (base-image bumps, weekly rebuilds, and common-dockerfiles changes
rebuild the same commit and would overwrite it).
Each build is now tagged with:
* <config-digest> - sha256 hex of the image config digest,
guaranteed unique for any image change
* <short_ref>-<short-digest> - human-readable, commit-traceable tag
The staging job uses tag_prefix: staging- to keep staging artifacts
distinct from promoted tags. generate-tags validates tag length against
the 128-character OCI/ECR limit and fails closed.
Wire the task into the main and staging jobs of the base, external,
internal, and pages pipelines, and document the tagging scheme in the
container README.
Co-authored-by: OpenCode Agent <david.n.anderson@gsa.gov>
rcgottlieb
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
Introduce a generate-tags task that produces immutable, traceable image tags in place of the standalone short_ref tag, which was not unique per build (base-image bumps, weekly rebuilds, and common-dockerfiles changes rebuild the same commit and would overwrite it).
Each build is now tagged with:
guaranteed unique for any image change
The staging job uses tag_prefix: staging- to keep staging artifacts distinct from promoted tags. generate-tags validates tag length against the 128-character OCI/ECR limit and fails closed.
Wire the task into the main and staging jobs of the base, external, internal, and pages pipelines, and document the tagging scheme in the container README.
Things to check
INFOand debugging statements are written withlog.debugor similar, then they won't be written to the otput, which can prevent unintentional leaks of sensitive data.Security considerations
Having these unique tags for our images will make it easier to track them, roll back to a previous version if necessary, and allow us create better lifecycle policies for our ECR repos.