Skip to content

Commit 7cffc4b

Browse files
fix(cleanup): handle fromImage properly by kubernetes and builtWithinLastNHours policies
Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
1 parent 422612c commit 7cffc4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: pkg/build/build_phase.go

+3
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,9 @@ func (phase *BuildPhase) prepareStageInstructions(ctx context.Context, img *imag
10191019

10201020
// TODO: remove this legacy logic in v3.
10211021
serviceLabels[imagePkg.WerfBaseImageIDLabel] = prevBuiltImage.Image.GetStageDesc().Info.ID
1022+
} else if img.IsBasedOnStage() {
1023+
baseStageImage := img.GetBaseStageImage()
1024+
serviceLabels[imagePkg.WerfParentStageID] = baseStageImage.Image.GetStageDesc().StageID.String()
10221025
}
10231026

10241027
// TODO: refactor this workaround required for the image spec stage.

0 commit comments

Comments
 (0)