Skip to content

Commit 78d2905

Browse files
fix(stapel): discarding newly built image might break reproducibility of subsequent stages
Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
1 parent f817fe6 commit 78d2905

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/build/build_phase.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,9 @@ func (phase *BuildPhase) atomicBuildStageImage(ctx context.Context, img *image.I
11371137
i.Image.SetStageDescription(stageDesc)
11381138
stg.SetStageImage(i)
11391139

1140+
// The stage digest is equal but stage content digest might be different.
1141+
stg.SetContentDigest(stageDesc.Info.Labels[imagePkg.WerfStageContentDigestLabel])
1142+
11401143
return nil
11411144
}
11421145

0 commit comments

Comments
 (0)