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

Update Paketo stack & builder references to Jammy #1745

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/delivery-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
default: false

env:
BUILDER: "paketobuildpacks/builder:tiny"
BUILDER: "paketobuildpacks/builder-jammy-tiny"
IMG_NAME: 'pack'
USERNAME: 'buildpacksio'

Expand Down
8 changes: 4 additions & 4 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func testWithoutSpecificBuilderRequirement(
when("config", func() {
when("default-builder", func() {
it("sets the default builder in ~/.pack/config.toml", func() {
builderName := "paketobuildpacks/builder:base"
builderName := "paketobuildpacks/builder-jammy-base"
output := pack.RunSuccessfully("config", "default-builder", builderName)

assertions.NewOutputAssertionManager(t, output).ReportsSettingDefaultBuilder(builderName)
Expand Down Expand Up @@ -576,7 +576,7 @@ func testWithoutSpecificBuilderRequirement(
when("report", func() {
when("default builder is set", func() {
it("redacts default builder", func() {
pack.RunSuccessfully("config", "default-builder", "paketobuildpacks/builder:base")
pack.RunSuccessfully("config", "default-builder", "paketobuildpacks/builder-jammy-base")

output := pack.RunSuccessfully("report")
version := pack.Version()
Expand All @@ -600,7 +600,7 @@ func testWithoutSpecificBuilderRequirement(
})

it("explicit mode doesn't redact", func() {
pack.RunSuccessfully("config", "default-builder", "paketobuildpacks/builder:base")
pack.RunSuccessfully("config", "default-builder", "paketobuildpacks/builder-jammy-base")

output := pack.RunSuccessfully("report", "--explicit")
version := pack.Version()
Expand All @@ -613,7 +613,7 @@ func testWithoutSpecificBuilderRequirement(
expectedOutput := pack.FixtureManager().TemplateFixture(
"report_output.txt",
map[string]interface{}{
"DefaultBuilder": "paketobuildpacks/builder:base",
"DefaultBuilder": "paketobuildpacks/builder-jammy-base",
"Version": version,
"OS": runtime.GOOS,
"Arch": runtime.GOARCH,
Expand Down
6 changes: 3 additions & 3 deletions acceptance/assertions/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ func (o OutputAssertionManager) IncludesPrefixedHerokuBuilders() {
}

var paketoBuilders = []string{
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
}

func (o OutputAssertionManager) IncludesPaketoBuilders() {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func setEnv() {
mockAppPath = filepath.Join("..", "acceptance", "testdata", "mock_app")
}
if paketoBuilder = os.Getenv("paketoBuilder"); paketoBuilder == "" {
paketoBuilder = "paketobuildpacks/builder:base"
paketoBuilder = "paketobuildpacks/builder-jammy-base"
}
if additionalBuildapck = os.Getenv("additionalBuildapck"); additionalBuildapck == "" {
additionalBuildapck = "docker://cnbs/sample-package:hello-universe"
Expand Down
17 changes: 11 additions & 6 deletions internal/builder/suggested_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,22 @@ var SuggestedBuilders = []SuggestedBuilder{
},
{
Vendor: "Paketo Buildpacks",
Image: "paketobuildpacks/builder:base",
DefaultDescription: "Small base image with buildpacks for Java, Node.js, Golang, & .NET Core",
Image: "paketobuildpacks/builder-jammy-base",
DefaultDescription: "Small base image with buildpacks for Java, Node.js, Golang, .NET Core, Python & Ruby",
},
{
Vendor: "Paketo Buildpacks",
Image: "paketobuildpacks/builder:full",
DefaultDescription: "Larger base image with buildpacks for Java, Node.js, Golang, .NET Core, & PHP",
Image: "paketobuildpacks/builder-jammy-full",
DefaultDescription: "Larger base image with buildpacks for Java, Node.js, Golang, .NET Core, Python, Ruby, & PHP",
},
{
Vendor: "Paketo Buildpacks",
Image: "paketobuildpacks/builder:tiny",
DefaultDescription: "Tiny base image (bionic build image, distroless run image) with buildpacks for Golang",
Image: "paketobuildpacks/builder-jammy-tiny",
DefaultDescription: "Tiny base image (jammy build image, distroless run image) with buildpacks for Golang & Java",
},
{
Vendor: "Paketo Buildpacks",
Image: "paketobuildpacks/builder-jammy-buildpackless-static",
DefaultDescription: "Static base image (jammy build image, distroless run image) suitable for static binaries like Go or Rust",
},
}
4 changes: 2 additions & 2 deletions internal/commands/builder_inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func testBuilderInspectCommand(t *testing.T, when spec.G, it spec.S) {

pack config default-builder <builder-image>`)

assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder:base'`))
assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder:full'`))
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'`))
})
})
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/buildpack_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func BuildpackNew(logger logging.Logger, creator BuildpackCreator) *cobra.Comman
cmd.Flags().StringVarP(&flags.API, "api", "a", "0.8", "Buildpack API compatibility of the generated buildpack")
cmd.Flags().StringVarP(&flags.Path, "path", "p", "", "Path to generate the buildpack")
cmd.Flags().StringVarP(&flags.Version, "version", "V", "1.0.0", "Version of the generated buildpack")
cmd.Flags().StringSliceVarP(&flags.Stacks, "stacks", "s", []string{"io.buildpacks.stacks.bionic"}, "Stack(s) this buildpack will be compatible with"+stringSliceHelp("stack"))
cmd.Flags().StringSliceVarP(&flags.Stacks, "stacks", "s", []string{"io.buildpacks.stacks.jammy"}, "Stack(s) this buildpack will be compatible with"+stringSliceHelp("stack"))

AddHelpFlag(cmd, "new")
return cmd
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/buildpack_new_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func testBuildpackNewCommand(t *testing.T, when spec.G, it spec.S) {
Path: filepath.Join(tmpDir, "some-cnb"),
Version: "1.0.0",
Stacks: []dist.Stack{{
ID: "io.buildpacks.stacks.bionic",
ID: "io.buildpacks.stacks.jammy",
Mixins: []string{},
}},
}).Return(nil).MaxTimes(1)
Expand Down
28 changes: 14 additions & 14 deletions internal/commands/config_trusted_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
"gcr.io/buildpacks/builder:v1",
"heroku/builder:22",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
)
})

Expand All @@ -73,9 +73,9 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
"gcr.io/buildpacks/builder:v1",
"heroku/builder:22",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
)
})
})
Expand All @@ -94,9 +94,9 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
"gcr.io/buildpacks/builder:v1",
"heroku/builder:22",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
)
outBuf.Reset()

Expand All @@ -111,9 +111,9 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
builderName,
"heroku/builder:22",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
)
})
})
Expand Down Expand Up @@ -171,7 +171,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
it("does nothing", func() {
h.AssertNil(t, os.WriteFile(configPath, []byte(""), os.ModePerm))

command.SetArgs(append(args, "paketobuildpacks/builder:base"))
command.SetArgs(append(args, "paketobuildpacks/builder-jammy-base"))
h.AssertNil(t, command.Execute())
oldContents, err := os.ReadFile(configPath)
h.AssertNil(t, err)
Expand Down Expand Up @@ -266,7 +266,7 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {

when("builder is a suggested builder", func() {
it("does nothing and reports that ", func() {
builder := "paketobuildpacks/builder:base"
builder := "paketobuildpacks/builder-jammy-base"
command := commands.ConfigTrustedBuilder(logger, config.Config{}, configPath)
command.SetArgs(append(args, builder))

Expand Down
4 changes: 2 additions & 2 deletions internal/commands/inspect_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ func testInspectBuilderCommand(t *testing.T, when spec.G, it spec.S) {

pack config default-builder <builder-image>`)

assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder:base'`))
assert.Matches(outBuf.String(), regexp.MustCompile(`Paketo Buildpacks:\s+'paketobuildpacks/builder:full'`))
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'`))
})
})
Expand Down
12 changes: 6 additions & 6 deletions internal/commands/list_trusted_builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func testListTrustedBuildersCommand(t *testing.T, when spec.G, it spec.S) {
"gcr.io/buildpacks/builder:v1",
"heroku/builder:22",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
)

listTrustedBuildersCommand := commands.ListTrustedBuilders(
Expand All @@ -88,9 +88,9 @@ func testListTrustedBuildersCommand(t *testing.T, when spec.G, it spec.S) {
"gcr.io/buildpacks/builder:v1",
builderName,
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
"paketobuildpacks/builder:tiny",
"paketobuildpacks/builder-jammy-base",
"paketobuildpacks/builder-jammy-full",
"paketobuildpacks/builder-jammy-tiny",
)
})
})
Expand Down
31 changes: 19 additions & 12 deletions internal/commands/stack_suggest.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,32 @@ var suggestedStacks = []suggestedStack{
RunImage: "heroku/heroku:20-cnb",
},
{
ID: "io.buildpacks.stacks.bionic",
Description: "A minimal Paketo stack based on Ubuntu 18.04",
ID: "io.buildpacks.stacks.jammy",
Description: "A minimal Paketo stack based on Ubuntu 22.04",
Maintainer: "Paketo Project",
BuildImage: "paketobuildpacks/build:base-cnb",
RunImage: "paketobuildpacks/run:base-cnb",
BuildImage: "paketobuildpacks/build-jammy-base",
RunImage: "paketobuildpacks/run-jammy-base",
},
{
ID: "io.buildpacks.stacks.bionic",
Description: "A large Paketo stack based on Ubuntu 18.04",
ID: "io.buildpacks.stacks.jammy",
Description: "A large Paketo stack based on Ubuntu 22.04",
Maintainer: "Paketo Project",
BuildImage: "paketobuildpacks/build:full-cnb",
RunImage: "paketobuildpacks/run:full-cnb",
BuildImage: "paketobuildpacks/build-jammy-full",
RunImage: "paketobuildpacks/run-jammy-full",
},
{
ID: "io.paketo.stacks.tiny",
Description: "A tiny Paketo stack based on Ubuntu 18.04, similar to distroless",
ID: "io.buildpacks.stacks.jammy.tiny",
Description: "A tiny Paketo stack based on Ubuntu 22.04, similar to distroless",
Maintainer: "Paketo Project",
BuildImage: "paketobuildpacks/build:tiny-cnb",
RunImage: "paketobuildpacks/run:tiny-cnb",
BuildImage: "paketobuildpacks/build-jammy-tiny",
RunImage: "paketobuildpacks/run-jammy-tiny",
},
{
ID: "io.buildpacks.stacks.jammy.static",
Description: "A static Paketo stack based on Ubuntu 22.04, similar to distroless",
Maintainer: "Paketo Project",
BuildImage: "paketobuildpacks/build-jammy-static",
RunImage: "paketobuildpacks/run-jammy-static",
},
}

Expand Down
30 changes: 18 additions & 12 deletions internal/commands/stack_suggest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,29 @@ func testStacksSuggestCommand(t *testing.T, when spec.G, it spec.S) {
Build Image: heroku/heroku:20-cnb-build
Run Image: heroku/heroku:20-cnb

Stack ID: io.buildpacks.stacks.bionic
Description: A minimal Paketo stack based on Ubuntu 18.04
Stack ID: io.buildpacks.stacks.jammy
Description: A minimal Paketo stack based on Ubuntu 22.04
Maintainer: Paketo Project
Build Image: paketobuildpacks/build:base-cnb
Run Image: paketobuildpacks/run:base-cnb
Build Image: paketobuildpacks/build-jammy-base
Run Image: paketobuildpacks/run-jammy-base

Stack ID: io.buildpacks.stacks.bionic
Description: A large Paketo stack based on Ubuntu 18.04
Stack ID: io.buildpacks.stacks.jammy
Description: A large Paketo stack based on Ubuntu 22.04
Maintainer: Paketo Project
Build Image: paketobuildpacks/build:full-cnb
Run Image: paketobuildpacks/run:full-cnb
Build Image: paketobuildpacks/build-jammy-full
Run Image: paketobuildpacks/run-jammy-full

Stack ID: io.paketo.stacks.tiny
Description: A tiny Paketo stack based on Ubuntu 18.04, similar to distroless
Stack ID: io.buildpacks.stacks.jammy.static
Description: A static Paketo stack based on Ubuntu 22.04, similar to distroless
Maintainer: Paketo Project
Build Image: paketobuildpacks/build:tiny-cnb
Run Image: paketobuildpacks/run:tiny-cnb
Build Image: paketobuildpacks/build-jammy-static
Run Image: paketobuildpacks/run-jammy-static

Stack ID: io.buildpacks.stacks.jammy.tiny
Description: A tiny Paketo stack based on Ubuntu 22.04, similar to distroless
Maintainer: Paketo Project
Build Image: paketobuildpacks/build-jammy-tiny
Run Image: paketobuildpacks/run-jammy-tiny
`)
})
})
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/trust_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func testTrustBuilderCommand(t *testing.T, when spec.G, it spec.S) {
it("does nothing", func() {
h.AssertNil(t, os.WriteFile(configPath, []byte(""), os.ModePerm))

command.SetArgs([]string{"paketobuildpacks/builder:base"})
command.SetArgs([]string{"paketobuildpacks/builder-jammy-base"})
h.AssertNil(t, command.Execute())
oldContents, err := os.ReadFile(configPath)
h.AssertNil(t, err)
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/untrust_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func testUntrustBuilderCommand(t *testing.T, when spec.G, it spec.S) {

when("builder is a suggested builder", func() {
it("does nothing and reports that ", func() {
builder := "paketobuildpacks/builder:base"
builder := "paketobuildpacks/builder-jammy-base"
command := commands.UntrustBuilder(logger, config.Config{}, configPath)
command.SetArgs([]string{builder})

Expand Down
12 changes: 6 additions & 6 deletions pkg/client/rebase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ func testRebase(t *testing.T, when spec.G, it spec.S) {
fakeAppImage = fakes.NewImage("some/app", "", &fakeIdentifier{name: "app-image"})
h.AssertNil(t, fakeAppImage.SetLabel("io.buildpacks.lifecycle.metadata",
`{"stack":{"runImage":{"image":"some/run", "mirrors":["example.com/some/run"]}}}`))
h.AssertNil(t, fakeAppImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.bionic"))
h.AssertNil(t, fakeAppImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.jammy"))
fakeImageFetcher.LocalImages["some/app"] = fakeAppImage

fakeRunImage = fakes.NewImage("some/run", "run-image-top-layer-sha", &fakeIdentifier{name: "run-image-digest"})
h.AssertNil(t, fakeRunImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.bionic"))
h.AssertNil(t, fakeRunImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.jammy"))
fakeImageFetcher.LocalImages["some/run"] = fakeRunImage

fakeRunImageMirror = fakes.NewImage("example.com/some/run", "mirror-top-layer-sha", &fakeIdentifier{name: "mirror-digest"})
h.AssertNil(t, fakeRunImageMirror.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.bionic"))
h.AssertNil(t, fakeRunImageMirror.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.jammy"))
fakeImageFetcher.LocalImages["example.com/some/run"] = fakeRunImageMirror

fakeLogger := logging.NewLogWithWriters(&out, &out)
Expand All @@ -72,7 +72,7 @@ func testRebase(t *testing.T, when spec.G, it spec.S) {

it.Before(func() {
fakeCustomRunImage = fakes.NewImage("custom/run", "custom-base-top-layer-sha", &fakeIdentifier{name: "custom-base-digest"})
h.AssertNil(t, fakeCustomRunImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.bionic"))
h.AssertNil(t, fakeCustomRunImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.jammy"))
fakeImageFetcher.LocalImages["custom/run"] = fakeCustomRunImage
})

Expand Down Expand Up @@ -128,7 +128,7 @@ func testRebase(t *testing.T, when spec.G, it spec.S) {
it.Before(func() {
fakeImageFetcher.LocalImages["example.com/some/app"] = fakeAppImage
fakeLocalMirror = fakes.NewImage("example.com/some/local-run", "local-mirror-top-layer-sha", &fakeIdentifier{name: "local-mirror-digest"})
h.AssertNil(t, fakeLocalMirror.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.bionic"))
h.AssertNil(t, fakeLocalMirror.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.jammy"))
fakeImageFetcher.LocalImages["example.com/some/local-run"] = fakeLocalMirror
})

Expand Down Expand Up @@ -168,7 +168,7 @@ func testRebase(t *testing.T, when spec.G, it spec.S) {

it.Before(func() {
fakeRemoteRunImage = fakes.NewImage("some/run", "remote-top-layer-sha", &fakeIdentifier{name: "remote-digest"})
h.AssertNil(t, fakeRemoteRunImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.bionic"))
h.AssertNil(t, fakeRemoteRunImage.SetLabel("io.buildpacks.stack.id", "io.buildpacks.stacks.jammy"))
fakeImageFetcher.RemoteImages["some/run"] = fakeRemoteRunImage
})

Expand Down
2 changes: 1 addition & 1 deletion pkg/client/register_buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func testRegisterBuildpack(t *testing.T, when spec.G, it spec.S) {
fakeAppImage = fakes.NewImage("buildpack/image", "", &fakeIdentifier{name: "buildpack-image"})

h.AssertNil(t, fakeAppImage.SetLabel("io.buildpacks.buildpackage.metadata",
`{"id":"heroku/java-function","version":"1.1.1","stacks":[{"id":"heroku-18"},{"id":"io.buildpacks.stacks.bionic"},{"id":"org.cloudfoundry.stacks.cflinuxfs3"}]}`))
`{"id":"heroku/java-function","version":"1.1.1","stacks":[{"id":"heroku-18"},{"id":"io.buildpacks.stacks.jammy"},{"id":"org.cloudfoundry.stacks.cflinuxfs3"}]}`))
fakeImageFetcher.RemoteImages["buildpack/image"] = fakeAppImage

fakeLogger := logging.NewLogWithWriters(&out, &out)
Expand Down
Loading