Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inject env var for deprecated builder #4420

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cli/cmd/v2/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ func build(ctx context.Context, client api.Client, inp buildInput) buildOutput {
Buildpacks: inp.BuildPacks,
}

if buildConfig.Builder == "heroku/buildpacks:20" {
if opts.Env == nil {
opts.Env = map[string]string{}
}
opts.Env["ALLOW_EOL_SHIMMED_BUILDER"] = "1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not recommend injecting this by default. Users may miss the EOL warning and not realise they need to upgrade ASAP.

As mentioned in heroku/cnb-builder-images#474 these images were superseded way back in June 2022, and we've been showing deprecation warnings in the build logs for 6 months now (we even attempted outreach about this in #3896).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(These images will soon receive zero security updates, and at some further point after that may even be deleted)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

err := packAgent.Build(ctx, opts, buildConfig, "")
if err != nil {
output.Error = fmt.Errorf("error building image with pack: %w", err)
Expand Down
Loading