Skip to content

Commit 98df913

Browse files
committed
fix(sbom): show deprecation warning for alpine builder images
Alpine builder images were silently skipped without a deprecation warning. Now they trigger the same warning as golang builder images to encourage migration. Signed-off-by: Alexandr Zaytsev <alexandr.zaytsev@flant.com>
1 parent 6a2aff5 commit 98df913

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

pkg/build/sbom_step.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,10 @@ func (step *sbomStep) GetImageBOM(ctx context.Context, imageName string, imageIn
168168
if err != nil {
169169
if isTrustedBuilderImage(imageInfo.Labels) {
170170
switch {
171-
case isGolangBuilderImage(imageInfo.Name):
171+
case isGolangBuilderImage(imageInfo.Name), isAlpineBuilderImage(imageInfo.Name):
172172
global_warnings.GlobalWarningLn(ctx,
173173
fmt.Sprintf("The builder image %q is DEPRECATED and it WILL CAUSE AN ERROR in the future. Plan your migration to an up-to-date builder image.", imageInfo.Name))
174174
return nil, ErrSbomNotRequired
175-
case isAlpineBuilderImage(imageInfo.Name):
176-
return nil, ErrSbomNotRequired
177175
default:
178176
if os.Getenv("WERF_E2E_ALLOW_LOCAL_BUILDER_IMAGES") == "true" {
179177
return nil, ErrSbomNotRequired

0 commit comments

Comments
 (0)