1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

Bump CNB_PLATFORM_API to v0.12 (#4686)

Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
This commit is contained in:
Pavel Busko 2023-11-21 13:26:52 +01:00 committed by GitHub
parent ca633186f9
commit 9596f546c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 29 deletions

View File

@ -32,7 +32,7 @@ import (
const (
creatorPath = "/cnb/lifecycle/creator"
platformPath = "/tmp/platform"
platformAPIVersion = "0.11"
platformAPIVersion = "0.12"
)
type cnbBuildUtilsBundle struct {

View File

@ -17,7 +17,7 @@ import (
const (
registryURL = "localhost:5000"
baseBuilder = "paketobuildpacks/builder:0.3.280-base"
baseBuilder = "paketobuildpacks/builder-jammy-base:0.4.252"
)
func setupDockerRegistry(t *testing.T, ctx context.Context) testcontainers.Container {
@ -65,7 +65,7 @@ func TestCNBIntegrationNPMProject(t *testing.T) {
assert.NoError(t, err)
container.assertHasOutput(t, "running command: /cnb/lifecycle/creator")
container.assertHasOutput(t, "Selected Node Engine version (using BP_NODE_VERSION): 16")
container.assertHasOutput(t, "Paketo NPM Start Buildpack")
container.assertHasOutput(t, "Paketo Buildpack for NPM Start")
container.assertHasOutput(t, fmt.Sprintf("Saving %s/node:0.0.1", registryURL))
container.assertHasOutput(t, "Setting default process type 'greeter'")
container.assertHasOutput(t, "*** Images (sha256:")
@ -77,7 +77,7 @@ func TestCNBIntegrationNPMProject(t *testing.T) {
assert.NoError(t, err)
container2.assertHasOutput(t, "running command: /cnb/lifecycle/creator")
container2.assertHasOutput(t, "Selected Node Engine version (using BP_NODE_VERSION): 16")
container2.assertHasOutput(t, "Paketo NPM Start Buildpack")
container2.assertHasOutput(t, "Paketo Buildpack for NPM Start")
container2.assertHasOutput(t, fmt.Sprintf("Saving %s/node:0.0.1", registryURL))
container2.assertHasOutput(t, "*** Images (sha256:")
container2.assertHasOutput(t, "SUCCESS")
@ -108,7 +108,7 @@ func TestCNBIntegrationProjectDescriptor(t *testing.T) {
"Downloading buildpack",
"Setting custom environment variables: 'map[BP_NODE_VERSION:16 TMPDIR:/tmp/cnbBuild-",
"Selected Node Engine version (using BP_NODE_VERSION): 16",
"Paketo NPM Start Buildpack",
"Paketo Buildpack for NPM Start",
fmt.Sprintf("Saving %s/not-found:0.0.1", registryURL),
"*** Images (sha256:",
"SUCCESS",
@ -202,14 +202,14 @@ func TestCNBIntegrationNPMCustomBuildpacksFullProject(t *testing.T) {
Network: fmt.Sprintf("container:%s", registryContainer.GetContainerID()),
})
err := container.whenRunningPiperCommand("cnbBuild", "--noTelemetry", "--verbose", "--buildpacks", "gcr.io/paketo-buildpacks/nodejs:0.19.0", "--containerImageName", "not-found", "--containerImageTag", "0.0.1", "--containerRegistryUrl", registryURL)
err := container.whenRunningPiperCommand("cnbBuild", "--noTelemetry", "--verbose", "--buildpacks", "gcr.io/paketo-buildpacks/nodejs:2.0.0", "--containerImageName", "not-found", "--containerImageTag", "0.0.1", "--containerRegistryUrl", registryURL)
assert.NoError(t, err)
container.assertHasOutput(t,
"Setting custom buildpacks: '[gcr.io/paketo-buildpacks/nodejs:0.19.0]'",
"Downloading buildpack 'gcr.io/paketo-buildpacks/nodejs:0.19.0' to /tmp/buildpacks_cache/sha256:",
"Setting custom buildpacks: '[gcr.io/paketo-buildpacks/nodejs:2.0.0]'",
"Downloading buildpack 'gcr.io/paketo-buildpacks/nodejs:2.0.0' to /tmp/buildpacks_cache/sha256:",
"running command: /cnb/lifecycle/creator",
"Paketo NPM Start Buildpack",
"Paketo Buildpack for NPM Start",
fmt.Sprintf("Saving %s/not-found:0.0.1", registryURL),
"*** Images (sha256:",
"SUCCESS",
@ -224,19 +224,19 @@ func TestCNBIntegrationNPMCustomBuildpacksBuildpacklessProject(t *testing.T) {
defer registryContainer.Terminate(ctx)
container := givenThisContainer(t, IntegrationTestDockerExecRunnerBundle{
Image: "paketobuildpacks/builder:buildpackless-full",
Image: "paketobuildpacks/builder-jammy-buildpackless-full",
User: "0",
TestDir: []string{"testdata", "TestMtaIntegration", "npm"},
Network: fmt.Sprintf("container:%s", registryContainer.GetContainerID()),
})
err := container.whenRunningPiperCommand("cnbBuild", "--noTelemetry", "--verbose", "--buildpacks", "gcr.io/paketo-buildpacks/nodejs:0.19.0", "--containerImageName", "not-found", "--containerImageTag", "0.0.1", "--containerRegistryUrl", registryURL)
err := container.whenRunningPiperCommand("cnbBuild", "--noTelemetry", "--verbose", "--buildpacks", "gcr.io/paketo-buildpacks/nodejs:2.0.0", "--containerImageName", "not-found", "--containerImageTag", "0.0.1", "--containerRegistryUrl", registryURL)
assert.NoError(t, err)
container.assertHasOutput(t, "Setting custom buildpacks: '[gcr.io/paketo-buildpacks/nodejs:0.19.0]'",
"Downloading buildpack 'gcr.io/paketo-buildpacks/nodejs:0.19.0' to /tmp/buildpacks_cache/sha256:",
container.assertHasOutput(t, "Setting custom buildpacks: '[gcr.io/paketo-buildpacks/nodejs:2.0.0]'",
"Downloading buildpack 'gcr.io/paketo-buildpacks/nodejs:2.0.0' to /tmp/buildpacks_cache/sha256:",
"running command: /cnb/lifecycle/creator",
"Paketo NPM Start Buildpack",
"Paketo Buildpack for NPM Start",
fmt.Sprintf("Saving %s/not-found:0.0.1", registryURL),
"*** Images (sha256:",
"SUCCESS",

View File

@ -14,16 +14,13 @@ value = "16"
[[build.buildpacks]]
id = "paketo-buildpacks/ca-certificates"
version = "3.2.5"
version = "3.6.6"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/node-engine:0.15.0"
uri = "gcr.io/paketo-buildpacks/node-engine:3.0.1"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/npm-install:0.10.3"
uri = "gcr.io/paketo-buildpacks/npm-install:1.3.1"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/node-module-bom:0.4.0"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/npm-start:0.9.2"
uri = "gcr.io/paketo-buildpacks/npm-start:1.0.15"

View File

@ -14,19 +14,16 @@ name = "BP_NODE_VERSION"
value = "16"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/ca-certificates:3.2.5"
uri = "gcr.io/paketo-buildpacks/ca-certificates:3.6.6"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/node-engine:0.15.0"
uri = "gcr.io/paketo-buildpacks/node-engine:3.0.1"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/npm-install:0.10.3"
uri = "gcr.io/paketo-buildpacks/npm-install:1.3.1"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/node-module-bom:0.4.0"
uri = "gcr.io/paketo-buildpacks/npm-start:1.0.15"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/npm-start:0.9.2"
[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/procfile:5.4.0"
uri = "gcr.io/paketo-buildpacks/procfile:5.6.7"