Skip to content

Commit

Permalink
Merge branch 'main' into visualize-sbom
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreilich authored Jan 24, 2022
2 parents 8934882 + f046f79 commit 45c726f
Show file tree
Hide file tree
Showing 16 changed files with 121 additions and 59 deletions.
1 change: 0 additions & 1 deletion acceptance/assertions/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ func (o OutputAssertionManager) IncludesPrefixedGoogleBuilder() {
}

var herokuBuilders = []string{
"heroku/buildpacks:18",
"heroku/buildpacks:20",
}

Expand Down
2 changes: 1 addition & 1 deletion acceptance/testdata/pack_fixtures/report_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pack:
Version: {{ .Version }}
OS/Arch: {{ .OS }}/{{ .Arch }}

Default Lifecycle Version: 0.13.1
Default Lifecycle Version: 0.13.2

Supported Platform APIs: 0.3, 0.4, 0.5, 0.6, 0.7, 0.8

Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/apex/log v1.9.0
github.com/buildpacks/imgutil v0.0.0-20211203200417-76206845baac
github.com/buildpacks/lifecycle v0.13.1
github.com/docker/cli v20.10.11+incompatible
github.com/docker/docker v20.10.11+incompatible
github.com/buildpacks/lifecycle v0.13.2
github.com/docker/cli v20.10.12+incompatible
github.com/docker/docker v20.10.12+incompatible
github.com/docker/go-connections v0.4.0
github.com/dustin/go-humanize v1.0.0
github.com/gdamore/tcell/v2 v2.4.0
Expand All @@ -26,8 +26,8 @@ require (
github.com/rivo/tview v0.0.0-20210624165335-29d673af0ce2
github.com/sabhiram/go-gitignore v0.0.0-20201211074657-223ce5d391b0
github.com/sclevine/spec v1.4.0
github.com/spf13/cobra v1.2.1
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
github.com/spf13/cobra v1.3.0
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
golang.org/x/mod v0.5.1
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
Expand Down Expand Up @@ -75,10 +75,10 @@ require (
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/net v0.0.0-20211203184738-4852103109b8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.42.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
Expand Down
115 changes: 105 additions & 10 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/builder/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// A snapshot of the latest tested lifecycle version values
const (
DefaultLifecycleVersion = "0.13.1"
DefaultLifecycleVersion = "0.13.2"
DefaultBuildpackAPIVersion = "0.2"
)

Expand Down
5 changes: 0 additions & 5 deletions internal/builder/suggested_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ var SuggestedBuilders = []SuggestedBuilder{
Image: "gcr.io/buildpacks/builder:v1",
DefaultDescription: "GCP Builder for all runtimes",
},
{
Vendor: "Heroku",
Image: "heroku/buildpacks:18",
DefaultDescription: "heroku-18 base image with buildpacks for Ruby, Java, Node.js, Python, Golang, & PHP",
},
{
Vendor: "Heroku",
Image: "heroku/buildpacks:20",
Expand Down
6 changes: 3 additions & 3 deletions internal/commands/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func testBuildCommand(t *testing.T, when spec.G, it spec.S) {
Return(nil)

logger.WantVerbose(true)
command.SetArgs([]string{"image", "--builder", "heroku/buildpacks:18"})
command.SetArgs([]string{"image", "--builder", "heroku/buildpacks:20"})
h.AssertNil(t, command.Execute())
h.AssertContains(t, outBuf.String(), "Builder 'heroku/buildpacks:18' is trusted")
h.AssertContains(t, outBuf.String(), "Builder 'heroku/buildpacks:20' is trusted")
})
})
})
Expand Down Expand Up @@ -714,7 +714,7 @@ builder = "my-builder"
})
})

when.Focus("previous-image flag is provided", func() {
when("previous-image flag is provided", func() {
when("image is invalid", func() {
it("error must be thrown", func() {
mockClient.EXPECT().
Expand Down
1 change: 0 additions & 1 deletion internal/commands/builder_inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ func testBuilderInspectCommand(t *testing.T, when spec.G, it spec.S) {

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(`Heroku:\s+'heroku/buildpacks:18'`))
assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/buildpacks:20'`))
})
})
Expand Down
4 changes: 0 additions & 4 deletions internal/commands/config_trusted_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
h.AssertContainsAllInOrder(t,
outBuf,
"gcr.io/buildpacks/builder:v1",
"heroku/buildpacks:18",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
Expand All @@ -72,7 +71,6 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
h.AssertContainsAllInOrder(t,
outBuf,
"gcr.io/buildpacks/builder:v1",
"heroku/buildpacks:18",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
Expand All @@ -93,7 +91,6 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
h.AssertContainsAllInOrder(t,
outBuf,
"gcr.io/buildpacks/builder:v1",
"heroku/buildpacks:18",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
Expand All @@ -110,7 +107,6 @@ func testTrustedBuilderCommand(t *testing.T, when spec.G, it spec.S) {
outBuf,
"gcr.io/buildpacks/builder:v1",
builderName,
"heroku/buildpacks:18",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
Expand Down
1 change: 0 additions & 1 deletion internal/commands/inspect_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ func testInspectBuilderCommand(t *testing.T, when spec.G, it spec.S) {

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(`Heroku:\s+'heroku/buildpacks:18'`))
assert.Matches(outBuf.String(), regexp.MustCompile(`Heroku:\s+'heroku/buildpacks:20'`))
})
})
Expand Down
2 changes: 0 additions & 2 deletions internal/commands/list_trusted_builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func testListTrustedBuildersCommand(t *testing.T, when spec.G, it spec.S) {
h.AssertContainsAllInOrder(t,
outBuf,
"gcr.io/buildpacks/builder:v1",
"heroku/buildpacks:18",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
Expand All @@ -88,7 +87,6 @@ func testListTrustedBuildersCommand(t *testing.T, when spec.G, it spec.S) {
outBuf,
"gcr.io/buildpacks/builder:v1",
builderName,
"heroku/buildpacks:18",
"heroku/buildpacks:20",
"paketobuildpacks/builder:base",
"paketobuildpacks/builder:full",
Expand Down
7 changes: 0 additions & 7 deletions internal/commands/stack_suggest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ type suggestedStack struct {
}

var suggestedStacks = []suggestedStack{
{
ID: "heroku-18",
Description: "The official Heroku stack based on Ubuntu 18.04",
Maintainer: "Heroku",
BuildImage: "heroku/pack:18-build",
RunImage: "heroku/pack:18",
},
{
ID: "heroku-20",
Description: "The official Heroku stack based on Ubuntu 20.04",
Expand Down
6 changes: 0 additions & 6 deletions internal/commands/stack_suggest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ func testStacksSuggestCommand(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, command.Execute())
h.AssertEq(t, outBuf.String(), `Stacks maintained by the community:
Stack ID: heroku-18
Description: The official Heroku stack based on Ubuntu 18.04
Maintainer: Heroku
Build Image: heroku/pack:18-build
Run Image: heroku/pack:18
Stack ID: heroku-20
Description: The official Heroku stack based on Ubuntu 20.04
Maintainer: Heroku
Expand Down
6 changes: 0 additions & 6 deletions internal/commands/suggest_stacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ func testSuggestStacksCommand(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, outBuf.String(), `Warning: Command 'pack suggest-stacks' has been deprecated, please use 'pack stack suggest' instead
Stacks maintained by the community:
Stack ID: heroku-18
Description: The official Heroku stack based on Ubuntu 18.04
Maintainer: Heroku
Build Image: heroku/pack:18-build
Run Image: heroku/pack:18
Stack ID: heroku-20
Description: The official Heroku stack based on Ubuntu 20.04
Maintainer: Heroku
Expand Down
4 changes: 2 additions & 2 deletions internal/inspectimage/writer/structured_bom_format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ func testStructuredBOMFormat(t *testing.T, when spec.G, it spec.S) {
}

err := structuredBOMWriter.Print(logger, generalInfo, nil, nil, nil, nil)
assert.ErrorWithMessage(err, fmt.Sprintf("unable to find image '%s' locally or remotely", "missing-image"))
assert.ErrorWithMessage(err, fmt.Sprintf("unable to find image '%s' locally or remotely", "some-image-name"))
})
})
when("fetching local and remote info errors", func() {
it.Focus("returns an error", func() {
it("returns an error", func() {
structuredBOMWriter := writer.StructuredBOMFormat{
MarshalFunc: func(i interface{}) ([]byte, error) {
return []byte("cool"), nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ func testBuild(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, args.Daemon, true)
h.AssertEq(t, args.PullPolicy, image.PullNever)

args = fakeImageFetcher.FetchCalls["buildpacksio/lifecycle:0.13.1"]
args = fakeImageFetcher.FetchCalls["buildpacksio/lifecycle:0.13.2"]
h.AssertEq(t, args.Daemon, true)
h.AssertEq(t, args.PullPolicy, image.PullNever)
h.AssertEq(t, args.Platform, "linux/amd64")
Expand Down

0 comments on commit 45c726f

Please sign in to comment.