feat: thread immutable image digest to deploy jobs - #152
Merged
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
Deploy jobs receive only `image_tag` (sourced from `state.Version`), a mutable tag. Operators who want to pin pulls to an immutable content digest had no way to receive one, even though the build's immutable artifact identifier is already captured into state as `artifact_id`.
Fix
Additively thread the immutable digest to deploy jobs alongside the existing tag. This follows cascade's additive-never-breaking API rule: `source_image_tag` / `image_tag` are untouched.
To use this, populate the build's `artifact_id` output with the content digest (for example a `sha256:...` image digest). cascade treats `artifact_id` as an opaque immutable identifier; it is only a content digest if the build emits one as such.
Prod-path and matrix-based deploys are not threaded in this change (no `prod_image_digest` output exists; matrix inputs come from per-promotion manifest values rather than preflight outputs). These are documented as out of scope.
Verification
```
--- PASS: TestMultiStepScenarios (0.00s)
ok github.com/stablekernel/cascade/e2e 20.199s
```