From 7bf91e704741adbc41664c7155b4b9f9ceda7aef Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:36:50 +0100 Subject: [PATCH] Suggest/trust `heroku/builder:20` instead of `heroku/buildpacks:20` The `heroku/buildpacks:20` builder has been superseded by `heroku/builder:20`, and the old builder is about to be deprecated: https://github.com/heroku/cnb-builder-images/pull/394 https://github.com/heroku/cnb-builder-images/blob/main/README.md As such, the suggested/trusted builders list has been updated accordingly. I've also tweaked the Heroku builder descriptions to: - mention the underlying Linux distro - fix the alphabetical ordering of supported buildpack languages Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com> --- acceptance/assertions/output.go | 2 +- internal/builder/suggested_builder.go | 6 +++--- internal/commands/build_test.go | 4 ++-- internal/commands/builder_inspect_test.go | 3 ++- internal/commands/config_trusted_builder_test.go | 8 ++++---- internal/commands/inspect_builder_test.go | 3 ++- internal/commands/list_trusted_builders_test.go | 5 +++-- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/acceptance/assertions/output.go b/acceptance/assertions/output.go index 8a024861b1..83279dfe60 100644 --- a/acceptance/assertions/output.go +++ b/acceptance/assertions/output.go @@ -182,8 +182,8 @@ func (o OutputAssertionManager) IncludesPrefixedGoogleBuilder() { } var herokuBuilders = []string{ + "heroku/builder:20", "heroku/builder:22", - "heroku/buildpacks:20", } func (o OutputAssertionManager) IncludesHerokuBuilders() { diff --git a/internal/builder/suggested_builder.go b/internal/builder/suggested_builder.go index 731f18c8f3..9495ce0a5b 100644 --- a/internal/builder/suggested_builder.go +++ b/internal/builder/suggested_builder.go @@ -15,12 +15,12 @@ var SuggestedBuilders = []SuggestedBuilder{ { Vendor: "Heroku", Image: "heroku/builder:22", - DefaultDescription: "Heroku-22 base image with buildpacks for Go, Java, Node.js, PHP, Python, Scala & Ruby", + DefaultDescription: "Heroku-22 (Ubuntu 22.04) base image with buildpacks for Go, Java, Node.js, PHP, Python, Ruby & Scala", }, { Vendor: "Heroku", - Image: "heroku/buildpacks:20", - DefaultDescription: "Heroku-20 base image with buildpacks for Go, Java, Node.js, PHP, Python, Scala & Ruby", + Image: "heroku/builder:20", + DefaultDescription: "Heroku-20 (Ubuntu 20.04) base image with buildpacks for Go, Java, Node.js, PHP, Python, Ruby & Scala", }, { Vendor: "Paketo Buildpacks", diff --git a/internal/commands/build_test.go b/internal/commands/build_test.go index 257f83cc66..6a59810004 100644 --- a/internal/commands/build_test.go +++ b/internal/commands/build_test.go @@ -121,9 +121,9 @@ func testBuildCommand(t *testing.T, when spec.G, it spec.S) { Return(nil) logger.WantVerbose(true) - command.SetArgs([]string{"image", "--builder", "heroku/buildpacks:20"}) + command.SetArgs([]string{"image", "--builder", "heroku/builder:22"}) h.AssertNil(t, command.Execute()) - h.AssertContains(t, outBuf.String(), "Builder 'heroku/buildpacks:20' is trusted") + h.AssertContains(t, outBuf.String(), "Builder 'heroku/builder:22' is trusted") }) }) }) diff --git a/internal/commands/builder_inspect_test.go b/internal/commands/builder_inspect_test.go index 54179e884a..aef3b4b242 100644 --- a/internal/commands/builder_inspect_test.go +++ b/internal/commands/builder_inspect_test.go @@ -254,7 +254,8 @@ func testBuilderInspectCommand(t *testing.T, when spec.G, it spec.S) { assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-base'`)) assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-full'`)) - assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/buildpacks:20'`)) + assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:20'`)) + assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:22'`)) }) }) diff --git a/internal/commands/config_trusted_builder_test.go b/internal/commands/config_trusted_builder_test.go index 90aa05623a..4dca813227 100644 --- a/internal/commands/config_trusted_builder_test.go +++ b/internal/commands/config_trusted_builder_test.go @@ -57,8 +57,8 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { h.AssertContainsAllInOrder(t, outBuf, "gcr.io/buildpacks/builder:v1", + "heroku/builder:20", "heroku/builder:22", - "heroku/buildpacks:20", "paketobuildpacks/builder-jammy-base", "paketobuildpacks/builder-jammy-full", "paketobuildpacks/builder-jammy-tiny", @@ -71,8 +71,8 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { h.AssertContainsAllInOrder(t, outBuf, "gcr.io/buildpacks/builder:v1", + "heroku/builder:20", "heroku/builder:22", - "heroku/buildpacks:20", "paketobuildpacks/builder-jammy-base", "paketobuildpacks/builder-jammy-full", "paketobuildpacks/builder-jammy-tiny", @@ -92,8 +92,8 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { h.AssertContainsAllInOrder(t, outBuf, "gcr.io/buildpacks/builder:v1", + "heroku/builder:20", "heroku/builder:22", - "heroku/buildpacks:20", "paketobuildpacks/builder-jammy-base", "paketobuildpacks/builder-jammy-full", "paketobuildpacks/builder-jammy-tiny", @@ -109,8 +109,8 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) { outBuf, "gcr.io/buildpacks/builder:v1", builderName, + "heroku/builder:20", "heroku/builder:22", - "heroku/buildpacks:20", "paketobuildpacks/builder-jammy-base", "paketobuildpacks/builder-jammy-full", "paketobuildpacks/builder-jammy-tiny", diff --git a/internal/commands/inspect_builder_test.go b/internal/commands/inspect_builder_test.go index d86503e7b3..e70b7404e4 100644 --- a/internal/commands/inspect_builder_test.go +++ b/internal/commands/inspect_builder_test.go @@ -215,7 +215,8 @@ func testInspectBuilderCommand(t *testing.T, when spec.G, it spec.S) { assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-base'`)) assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder-jammy-full'`)) - assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/buildpacks:20'`)) + assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:20'`)) + assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/builder:22'`)) }) }) diff --git a/internal/commands/list_trusted_builders_test.go b/internal/commands/list_trusted_builders_test.go index 006e264963..df38b0c805 100644 --- a/internal/commands/list_trusted_builders_test.go +++ b/internal/commands/list_trusted_builders_test.go @@ -65,8 +65,8 @@ func testListTrustedBuildersCommand(t *testing.T, when spec.G, it spec.S) { h.AssertContainsAllInOrder(t, outBuf, "gcr.io/buildpacks/builder:v1", + "heroku/builder:20", "heroku/builder:22", - "heroku/buildpacks:20", "paketobuildpacks/builder-jammy-base", "paketobuildpacks/builder-jammy-full", "paketobuildpacks/builder-jammy-tiny", @@ -87,7 +87,8 @@ func testListTrustedBuildersCommand(t *testing.T, when spec.G, it spec.S) { outBuf, "gcr.io/buildpacks/builder:v1", builderName, - "heroku/buildpacks:20", + "heroku/builder:20", + "heroku/builder:22", "paketobuildpacks/builder-jammy-base", "paketobuildpacks/builder-jammy-full", "paketobuildpacks/builder-jammy-tiny",