Skip to content

Commit

Permalink
Updates buildpack.toml with 1.23.0 (#872)
Browse files Browse the repository at this point in the history
* go 1.21 out. 1.23 in

* Updating buildpack.toml with new versions 1.23.0

---------

Co-authored-by: Arjun Sreedharan <asreedharan@vmware.com>
  • Loading branch information
paketo-bot and arjun024 authored Aug 26, 2024
1 parent 3feed1e commit a585a52
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 47 deletions.
48 changes: 17 additions & 31 deletions buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,7 @@ api = "0.7"
include-files = ["bin/run", "bin/build", "bin/detect", "buildpack.toml"]
pre-package = "./scripts/build.sh"
[metadata.default-versions]
go = "1.21.*"

[[metadata.dependencies]]
checksum = "sha256:121ab58632787e18ae0caa8ae285b581f9470d0f6b3defde9e1600e211f583c5"
cpe = "cpe:2.3:a:golang:go:1.21.12:*:*:*:*:*:*:*"
id = "go"
licenses = ["BSD-3-Clause"]
name = "Go"
purl = "pkg:generic/go@go1.21.12?checksum=121ab58632787e18ae0caa8ae285b581f9470d0f6b3defde9e1600e211f583c5&download_url=https://go.dev/dl/go1.21.12.linux-amd64.tar.gz"
source = "https://go.dev/dl/go1.21.12.src.tar.gz"
source-checksum = "sha256:30e68af27bc1f1df231e3ab74f3d17d3b8d52a089c79bcaab573b4f1b807ed4f"
stacks = ["*"]
strip-components = 1
uri = "https://go.dev/dl/go1.21.12.linux-amd64.tar.gz"
version = "1.21.12"

[[metadata.dependencies]]
checksum = "sha256:502fc16d5910562461e6a6631fb6377de2322aad7304bf2bcd23500ba9dab4a7"
cpe = "cpe:2.3:a:golang:go:1.21.13:*:*:*:*:*:*:*"
id = "go"
licenses = ["BSD-3-Clause"]
name = "Go"
purl = "pkg:generic/go@go1.21.13?checksum=502fc16d5910562461e6a6631fb6377de2322aad7304bf2bcd23500ba9dab4a7&download_url=https://go.dev/dl/go1.21.13.linux-amd64.tar.gz"
source = "https://go.dev/dl/go1.21.13.src.tar.gz"
source-checksum = "sha256:71fb31606a1de48d129d591e8717a63e0c5565ffba09a24ea9f899a13214c34d"
stacks = ["*"]
strip-components = 1
uri = "https://go.dev/dl/go1.21.13.linux-amd64.tar.gz"
version = "1.21.13"
go = "1.22.*"

[[metadata.dependencies]]
checksum = "sha256:904b924d435eaea086515bc63235b192ea441bd8c9b198c507e85009e6e4c7f0"
Expand Down Expand Up @@ -74,13 +46,27 @@ api = "0.7"
uri = "https://go.dev/dl/go1.22.6.linux-amd64.tar.gz"
version = "1.22.6"

[[metadata.dependencies]]
checksum = "sha256:905a297f19ead44780548933e0ff1a1b86e8327bb459e92f9c0012569f76f5e3"
cpe = "cpe:2.3:a:golang:go:1.23.0:*:*:*:*:*:*:*"
id = "go"
licenses = ["BSD-3-Clause"]
name = "Go"
purl = "pkg:generic/go@go1.23.0?checksum=905a297f19ead44780548933e0ff1a1b86e8327bb459e92f9c0012569f76f5e3&download_url=https://go.dev/dl/go1.23.0.linux-amd64.tar.gz"
source = "https://go.dev/dl/go1.23.0.src.tar.gz"
source-checksum = "sha256:42b7a8e80d805daa03022ed3fde4321d4c3bf2c990a144165d01eeecd6f699c6"
stacks = ["*"]
strip-components = 1
uri = "https://go.dev/dl/go1.23.0.linux-amd64.tar.gz"
version = "1.23.0"

[[metadata.dependency-constraints]]
constraint = "1.21.*"
constraint = "1.22.*"
id = "go"
patches = 2

[[metadata.dependency-constraints]]
constraint = "1.22.*"
constraint = "1.23.*"
id = "go"
patches = 2

Expand Down
6 changes: 3 additions & 3 deletions integration/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,18 @@ func testDefault(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("go1.21")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("go1.22")).OnPort(8080))

Expect(logs).To(ContainLines(
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, buildpackInfo.Buildpack.Name)),
" Resolving Go version",
" Candidate version sources (in priority order):",
" <unknown> -> \"\"",
"",
MatchRegexp(` Selected Go version \(using <unknown>\): 1\.21\.\d+`),
MatchRegexp(` Selected Go version \(using <unknown>\): 1\.22\.\d+`),
"",
" Executing build process",
MatchRegexp(` Installing Go 1\.21\.\d+`),
MatchRegexp(` Installing Go 1\.22\.\d+`),
MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`),
"",
fmt.Sprintf(" Generating SBOM for /layers/%s/go", strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_")),
Expand Down
10 changes: 5 additions & 5 deletions integration/environment_variable_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func testEnvironmentVariableConfiguration(t *testing.T, context spec.G, it spec.
image, logs, err = pack.WithNoColor().Build.
WithPullPolicy("never").
WithBuildpacks(buildpack, buildPlanBuildpack).
WithEnv(map[string]string{"BP_GO_VERSION": "1.21.*"}).
WithEnv(map[string]string{"BP_GO_VERSION": "1.22.*"}).
Execute(name, source)
Expect(err).ToNot(HaveOccurred(), logs.String)

Expand All @@ -77,19 +77,19 @@ func testEnvironmentVariableConfiguration(t *testing.T, context spec.G, it spec.
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("go1.21")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("go1.22")).OnPort(8080))

Expect(logs).To(ContainLines(
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, buildpackInfo.Buildpack.Name)),
" Resolving Go version",
" Candidate version sources (in priority order):",
" BP_GO_VERSION -> \"1.21.*\"",
" BP_GO_VERSION -> \"1.22.*\"",
" <unknown> -> \"\"",
"",
MatchRegexp(` Selected Go version \(using BP_GO_VERSION\): 1\.21\.\d+`),
MatchRegexp(` Selected Go version \(using BP_GO_VERSION\): 1\.22\.\d+`),
"",
" Executing build process",
MatchRegexp(` Installing Go 1\.21\.\d+`),
MatchRegexp(` Installing Go 1\.22\.\d+`),
MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`),
))
})
Expand Down
14 changes: 7 additions & 7 deletions integration/layer_reuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
" Candidate version sources (in priority order):",
" <unknown> -> \"\"",
"",
MatchRegexp(` Selected Go version \(using <unknown>\): 1\.21\.\d+`),
MatchRegexp(` Selected Go version \(using <unknown>\): 1\.22\.\d+`),
"",
" Executing build process",
MatchRegexp(` Installing Go 1\.21\.\d+`),
MatchRegexp(` Installing Go 1\.22\.\d+`),
MatchRegexp(` Completed in \d+(\.?\d+)*`),
))

Expand Down Expand Up @@ -121,7 +121,7 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
" Candidate version sources (in priority order):",
" <unknown> -> \"\"",
"",
MatchRegexp(` Selected Go version \(using <unknown>\): 1\.21\.\d+`),
MatchRegexp(` Selected Go version \(using <unknown>\): 1\.22\.\d+`),
"",
fmt.Sprintf(" Reusing cached layer /layers/%s/go", strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_")),
))
Expand All @@ -136,7 +136,7 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {

containerIDs[secondContainer.ID] = struct{}{}

Eventually(secondContainer).Should(Serve(ContainSubstring("go1.21")).OnPort(8080))
Eventually(secondContainer).Should(Serve(ContainSubstring("go1.22")).OnPort(8080))

Expect(secondImage.Buildpacks[0].Layers["go"].SHA).To(Equal(firstImage.Buildpacks[0].Layers["go"].SHA))
})
Expand Down Expand Up @@ -166,7 +166,7 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
firstImage, _, err := pack.WithNoColor().Build.
WithPullPolicy("never").
WithBuildpacks(buildpack, buildPlanBuildpack).
WithEnv(map[string]string{"BP_GO_VERSION": "1.21.*"}).
WithEnv(map[string]string{"BP_GO_VERSION": "1.22.*"}).
Execute(name, source)
Expect(err).NotTo(HaveOccurred())

Expand All @@ -192,7 +192,7 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
secondImage, _, err := pack.WithNoColor().Build.
WithPullPolicy("never").
WithBuildpacks(buildpack, buildPlanBuildpack).
WithEnv(map[string]string{"BP_GO_VERSION": "1.22.*"}).
WithEnv(map[string]string{"BP_GO_VERSION": "1.23.*"}).
Execute(name, source)
Expect(err).NotTo(HaveOccurred())

Expand All @@ -212,7 +212,7 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {

containerIDs[secondContainer.ID] = struct{}{}

Eventually(secondContainer).Should(Serve(ContainSubstring("go1.22")).OnPort(8080))
Eventually(secondContainer).Should(Serve(ContainSubstring("go1.23")).OnPort(8080))

Expect(secondImage.Buildpacks[0].Layers["go"].SHA).NotTo(Equal(firstImage.Buildpacks[0].Layers["go"].SHA))
})
Expand Down
2 changes: 1 addition & 1 deletion integration/offline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func testOffline(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("go1.21")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("go1.22")).OnPort(8080))
})
})
}

0 comments on commit a585a52

Please sign in to comment.