Skip to content

Commit

Permalink
fix(stapel): discarding newly built image might break reproducibility…
Browse files Browse the repository at this point in the history
… of subsequent stages

Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
  • Loading branch information
alexey-igrychev committed Mar 29, 2024
1 parent f817fe6 commit 78d2905
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/build/build_phase.go
Expand Up @@ -1137,6 +1137,9 @@ func (phase *BuildPhase) atomicBuildStageImage(ctx context.Context, img *image.I
i.Image.SetStageDescription(stageDesc)
stg.SetStageImage(i)

// The stage digest is equal but stage content digest might be different.
stg.SetContentDigest(stageDesc.Info.Labels[imagePkg.WerfStageContentDigestLabel])

return nil
}

Expand Down

0 comments on commit 78d2905

Please sign in to comment.