From 2002e8447fc21498b3a1e4616ba75e9480363915 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Tue, 19 Sep 2023 15:42:27 -0400 Subject: [PATCH 1/2] Update acceptance fixtures to use newer Buildpack API versions Lifecycle 0.18.0 and above will only support Buildpack API versions 0.7 and above Signed-off-by: Natalie Arellano --- acceptance/acceptance_test.go | 29 +++++++++---------- .../descriptor-buildpack/buildpack.toml | 2 +- .../internet-capable-buildpack/buildpack.toml | 2 +- .../meta-buildpack-dependency/buildpack.toml | 2 +- .../meta-buildpack/buildpack.toml | 2 +- .../nested-level-1-buildpack/buildpack.toml | 2 +- .../nested-level-2-buildpack/buildpack.toml | 2 +- .../noop-buildpack-2/buildpack.toml | 2 +- .../noop-buildpack/buildpack.toml | 2 +- .../not-in-builder-buildpack/buildpack.toml | 2 +- .../other-stack-buildpack/buildpack.toml | 2 +- .../read-env-buildpack/bin/build | 6 ++-- .../read-env-buildpack/bin/build.bat | 6 ++-- .../read-env-buildpack/buildpack.toml | 2 +- .../read-volume-buildpack/buildpack.toml | 2 +- .../buildpack.toml | 2 +- .../bin/build | 7 +++-- .../bin/build.bat | 7 +++-- .../buildpack.toml | 2 +- .../simple-layers-buildpack/bin/build | 10 +++++-- .../simple-layers-buildpack/bin/build.bat | 10 +++++-- .../simple-layers-buildpack/buildpack.toml | 2 +- .../simple-layers-extension/extension.toml | 2 +- .../buildpack.toml | 2 +- 24 files changed, 64 insertions(+), 45 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 38b98e4b8..07e90a79f 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -794,23 +794,20 @@ func testAcceptance( }) it("creates builder", func() { - // Linux containers (including Linux containers on Windows) - extSimpleLayersDiffID := "sha256:b9e4a0ddfb650c7aa71d1e6aceea1665365e409b3078bfdc1e51c2b07ab2b423" - extReadEnvDiffID := "sha256:4490d78f2b056cdb99ad9cd3892f3c0617c5a485fb300dd90c572ce375ee45b2" - bpSimpleLayersDiffID := "sha256:285ff6683c99e5ae19805f6a62168fb40dca64d813c53b782604c9652d745c70" - bpReadEnvDiffID := "sha256:dd1e0efcbf3f08b014ef6eff9cfe7a9eac1cf20bd9b6a71a946f0a74575aa56f" - if imageManager.HostOS() == "windows" { // Windows containers on Windows - extSimpleLayersDiffID = "sha256:a063cf949b9c267133e451ac8cd95b4e77571bb7c629dd817461dca769170810" - extReadEnvDiffID = "sha256:ae9520eef7d84f69da6adf2597266660ce3fa5fd8ddac716cbfbecb67ded50e5" - bpSimpleLayersDiffID = "sha256:ccd1234cc5685e8a412b70c5f9a8e7b584b8e4f2a20c987ec242c9055de3e45e" - bpReadEnvDiffID = "sha256:8b22a7742ffdfbdd978787c6937456b68afb27c3585a3903048be7434d251e3f" + if imageManager.HostOS() != "windows" { + // Linux containers (including Linux containers on Windows) + extSimpleLayersDiffID := "sha256:d24758b8b75b13292746fe7a06666f28a9499da31826a60afe6ee6b8cba29b73" + extReadEnvDiffID := "sha256:4490d78f2b056cdb99ad9cd3892f3c0617c5a485fb300dd90c572ce375ee45b2" + bpSimpleLayersDiffID := "sha256:ff38769b05fb483c8e24dade16476f7153707ef9cdcb3f43cdc8d2d65dbc66ae" + bpReadEnvDiffID := "sha256:b22ad0adcc5f9fb0d2bb358e6483e9f50f4375e659472217ff564cd8d11ea955" + // extensions + assertImage.HasLabelWithData(builderName, "io.buildpacks.extension.layers", `{"read/env":{"read-env-version":{"api":"0.9","layerDiffID":"`+extReadEnvDiffID+`","name":"Read Env Extension"}},"simple/layers":{"simple-layers-version":{"api":"0.7","layerDiffID":"`+extSimpleLayersDiffID+`","name":"Simple Layers Extension"}}}`) + assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.order-extensions", `[{"group":[{"id":"read/env","version":"read-env-version"},{"id":"simple/layers","version":"simple-layers-version"}]}]`) + // buildpacks + assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.layers", `{"read/env":{"read-env-version":{"api":"0.7","stacks":[{"id":"pack.test.stack"}],"layerDiffID":"`+bpReadEnvDiffID+`","name":"Read Env Buildpack"}},"simple/layers":{"simple-layers-version":{"api":"0.7","stacks":[{"id":"pack.test.stack"}],"layerDiffID":"`+bpSimpleLayersDiffID+`","name":"Simple Layers Buildpack"}}}`) + assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.order", `[{"group":[{"id":"read/env","version":"read-env-version","optional":true},{"id":"simple/layers","version":"simple-layers-version","optional":true}]}]`) + } - // extensions - assertImage.HasLabelWithData(builderName, "io.buildpacks.extension.layers", `{"read/env":{"read-env-version":{"api":"0.9","layerDiffID":"`+extReadEnvDiffID+`","name":"Read Env Extension"}},"simple/layers":{"simple-layers-version":{"api":"0.2","layerDiffID":"`+extSimpleLayersDiffID+`","name":"Simple Layers Extension"}}}`) - assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.order-extensions", `[{"group":[{"id":"read/env","version":"read-env-version"},{"id":"simple/layers","version":"simple-layers-version"}]}]`) - // buildpacks - assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.layers", `{"read/env":{"read-env-version":{"api":"0.2","stacks":[{"id":"pack.test.stack"}],"layerDiffID":"`+bpReadEnvDiffID+`","name":"Read Env Buildpack"}},"simple/layers":{"simple-layers-version":{"api":"0.2","stacks":[{"id":"pack.test.stack"}],"layerDiffID":"`+bpSimpleLayersDiffID+`","name":"Simple Layers Buildpack"}}}`) - assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.order", `[{"group":[{"id":"read/env","version":"read-env-version","optional":true},{"id":"simple/layers","version":"simple-layers-version","optional":true}]}]`) }) when("build", func() { diff --git a/acceptance/testdata/mock_buildpacks/descriptor-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/descriptor-buildpack/buildpack.toml index d25a1e90e..e60c1b61d 100644 --- a/acceptance/testdata/mock_buildpacks/descriptor-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/descriptor-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "descriptor/bp" diff --git a/acceptance/testdata/mock_buildpacks/internet-capable-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/internet-capable-buildpack/buildpack.toml index f4a886a5a..b3cd45efb 100644 --- a/acceptance/testdata/mock_buildpacks/internet-capable-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/internet-capable-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "internet/bp" diff --git a/acceptance/testdata/mock_buildpacks/meta-buildpack-dependency/buildpack.toml b/acceptance/testdata/mock_buildpacks/meta-buildpack-dependency/buildpack.toml index 668299eab..179206306 100644 --- a/acceptance/testdata/mock_buildpacks/meta-buildpack-dependency/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/meta-buildpack-dependency/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "local/meta-bp-dep" diff --git a/acceptance/testdata/mock_buildpacks/meta-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/meta-buildpack/buildpack.toml index 799806eeb..3bf66937b 100644 --- a/acceptance/testdata/mock_buildpacks/meta-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/meta-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "local/meta-bp" diff --git a/acceptance/testdata/mock_buildpacks/nested-level-1-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/nested-level-1-buildpack/buildpack.toml index 268e7f8cb..a711b1eb1 100644 --- a/acceptance/testdata/mock_buildpacks/nested-level-1-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/nested-level-1-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "simple/nested-level-1" diff --git a/acceptance/testdata/mock_buildpacks/nested-level-2-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/nested-level-2-buildpack/buildpack.toml index 5e58244fd..4531cb6be 100644 --- a/acceptance/testdata/mock_buildpacks/nested-level-2-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/nested-level-2-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "simple/nested-level-2" diff --git a/acceptance/testdata/mock_buildpacks/noop-buildpack-2/buildpack.toml b/acceptance/testdata/mock_buildpacks/noop-buildpack-2/buildpack.toml index 1fc577bbc..1c0351887 100644 --- a/acceptance/testdata/mock_buildpacks/noop-buildpack-2/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/noop-buildpack-2/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "noop.buildpack" diff --git a/acceptance/testdata/mock_buildpacks/noop-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/noop-buildpack/buildpack.toml index f3460a484..9c6a58712 100644 --- a/acceptance/testdata/mock_buildpacks/noop-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/noop-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "noop.buildpack" diff --git a/acceptance/testdata/mock_buildpacks/not-in-builder-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/not-in-builder-buildpack/buildpack.toml index c0f012d55..32ec32b5d 100644 --- a/acceptance/testdata/mock_buildpacks/not-in-builder-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/not-in-builder-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "local/bp" diff --git a/acceptance/testdata/mock_buildpacks/other-stack-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/other-stack-buildpack/buildpack.toml index 115ca9547..5cf0da993 100644 --- a/acceptance/testdata/mock_buildpacks/other-stack-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/other-stack-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "other/stack/bp" diff --git a/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build b/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build index fc20479ce..c5145bf2b 100755 --- a/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build +++ b/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build @@ -16,7 +16,8 @@ if [[ -f "$platform_dir/env/ENV1_CONTENTS" ]]; then contents=$(cat "$platform_dir/env/ENV1_CONTENTS") echo "$contents" > "$launch_dir/env1-launch-layer/env1-launch-dep" ln -snf "$launch_dir/env1-launch-layer" env1-launch-deps - echo "launch = true" > "$launch_dir/env1-launch-layer.toml" + echo "[types]" > "$launch_dir/env1-launch-layer.toml" + echo "launch = true" >> "$launch_dir/env1-launch-layer.toml" fi ## makes a launch layer @@ -26,7 +27,8 @@ if [[ -f "$platform_dir/env/ENV2_CONTENTS" ]]; then contents=$(cat "$platform_dir/env/ENV2_CONTENTS") echo "$contents" > "$launch_dir/env2-launch-layer/env2-launch-dep" ln -snf "$launch_dir/env2-launch-layer" env2-launch-deps - echo "launch = true" > "$launch_dir/env2-launch-layer.toml" + echo "[types]" > "$launch_dir/env2-launch-layer.toml" + echo "launch = true" >> "$launch_dir/env2-launch-layer.toml" fi echo "---> Done" diff --git a/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat b/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat index dd5e96d5c..9381683f5 100644 --- a/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat +++ b/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat @@ -11,7 +11,8 @@ if exist %platform_dir%\env\ENV1_CONTENTS ( set /p contents=<%platform_dir%\env\ENV1_CONTENTS echo !contents!> %launch_dir%\env1-launch-layer\env1-launch-dep mklink /j env1-launch-deps %launch_dir%\env1-launch-layer - echo launch = true> %launch_dir%\env1-launch-layer.toml + echo "[types]" > %launch_dir%\env1-launch-layer.toml + echo launch = true >> %launch_dir%\env1-launch-layer.toml ) :: makes a launch layer @@ -21,7 +22,8 @@ if exist %platform_dir%\env\ENV2_CONTENTS ( set /p contents=<%platform_dir%\env\ENV2_CONTENTS echo !contents!> %launch_dir%\env2-launch-layer\env2-launch-dep mklink /j env2-launch-deps %launch_dir%\env2-launch-layer - echo launch = true> %launch_dir%\env2-launch-layer.toml + echo "[types]" > %launch_dir%\env2-launch-layer.toml + echo launch = true >> %launch_dir%\env2-launch-layer.toml ) echo --- Done diff --git a/acceptance/testdata/mock_buildpacks/read-env-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/read-env-buildpack/buildpack.toml index 09a0ef246..f6a1b5093 100644 --- a/acceptance/testdata/mock_buildpacks/read-env-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/read-env-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "read/env" diff --git a/acceptance/testdata/mock_buildpacks/read-volume-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/read-volume-buildpack/buildpack.toml index edced5070..e2c6385c0 100644 --- a/acceptance/testdata/mock_buildpacks/read-volume-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/read-volume-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "volume/bp" diff --git a/acceptance/testdata/mock_buildpacks/read-write-volume-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/read-write-volume-buildpack/buildpack.toml index a7087c2b4..95a24f3e4 100644 --- a/acceptance/testdata/mock_buildpacks/read-write-volume-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/read-write-volume-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "rw-volume/bp" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build index 7b0518eb5..27a83c336 100755 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build @@ -17,7 +17,8 @@ echo "Color: Styled" mkdir "$launch_dir/launch-layer" echo "Launch Dep Contents" > "$launch_dir/launch-layer/launch-dep" ln -snf "$launch_dir/launch-layer" launch-deps -echo "launch = true" > "$launch_dir/launch-layer.toml" +echo "[types]" > "$launch_dir/launch-layer.toml" +echo "launch = true" >> "$launch_dir/launch-layer.toml" ## makes a cached launch layer if [[ ! -f "$launch_dir/cached-launch-layer.toml" ]]; then @@ -25,7 +26,8 @@ if [[ ! -f "$launch_dir/cached-launch-layer.toml" ]]; then mkdir "$launch_dir/cached-launch-layer" echo "Cached Dep Contents" > "$launch_dir/cached-launch-layer/cached-dep" ln -snf "$launch_dir/cached-launch-layer" cached-deps - echo "launch = true" > "$launch_dir/cached-launch-layer.toml" + echo "[types]" > "$launch_dir/cached-launch-layer.toml" + echo "launch = true" >> "$launch_dir/cached-launch-layer.toml" echo "cache = true" >> "$launch_dir/cached-launch-layer.toml" else echo "reusing cached launch layer" @@ -38,6 +40,7 @@ cat < "$launch_dir/launch.toml" type = "web" command = "./run" args = ["8080"] + default = true [[processes]] type = "hello" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat index 01421d77f..37bd44ba7 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat @@ -8,7 +8,8 @@ echo making launch layer %launch_dir%\launch-layer mkdir %launch_dir%\launch-layer echo Launch Dep Contents > "%launch_dir%\launch-layer\launch-dep mklink /j launch-deps %launch_dir%\launch-layer -echo launch = true > %launch_dir%\launch-layer.toml +echo "[types]" > %launch_dir%\launch-layer.toml +echo launch = true >> %launch_dir%\launch-layer.toml :: makes a cached launch layer if not exist %launch_dir%\cached-launch-layer.toml ( @@ -16,7 +17,8 @@ if not exist %launch_dir%\cached-launch-layer.toml ( mkdir %launch_dir%\cached-launch-layer echo Cached Dep Contents > %launch_dir%\cached-launch-layer\cached-dep mklink /j cached-deps %launch_dir%\cached-launch-layer - echo launch = true > %launch_dir%\cached-launch-layer.toml + echo "[types]" > %launch_dir%\cached-launch-layer.toml + echo launch = true >> %launch_dir%\cached-launch-layer.toml echo cache = true >> %launch_dir%\cached-launch-layer.toml ) else ( echo reusing cached launch layer %launch_dir%\cached-launch-layer @@ -29,6 +31,7 @@ echo [[processes]] echo type = "web" echo command = '.\run' echo args = ["8080"] +echo default = true echo. echo [[processes]] echo type = "hello" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/buildpack.toml b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/buildpack.toml index 22b290e57..b772b61ab 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "simple/layers" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build index 01568be0f..e2dce349b 100755 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build @@ -17,7 +17,8 @@ echo "Color: Styled" mkdir "$launch_dir/launch-layer" echo "Launch Dep Contents" > "$launch_dir/launch-layer/launch-dep" ln -snf "$launch_dir/launch-layer" launch-deps -echo "launch = true" > "$launch_dir/launch-layer.toml" +echo "[types]" > "$launch_dir/launch-layer.toml" +echo "launch = true" >> "$launch_dir/launch-layer.toml" ## makes a cached launch layer if [[ ! -f "$launch_dir/cached-launch-layer.toml" ]]; then @@ -25,10 +26,14 @@ if [[ ! -f "$launch_dir/cached-launch-layer.toml" ]]; then mkdir "$launch_dir/cached-launch-layer" echo "Cached Dep Contents" > "$launch_dir/cached-launch-layer/cached-dep" ln -snf "$launch_dir/cached-launch-layer" cached-deps - echo "launch = true" > "$launch_dir/cached-launch-layer.toml" + echo "[types]" > "$launch_dir/cached-launch-layer.toml" + echo "launch = true" >> "$launch_dir/cached-launch-layer.toml" echo "cache = true" >> "$launch_dir/cached-launch-layer.toml" else echo "reusing cached launch layer" + echo "[types]" > "$launch_dir/cached-launch-layer.toml" + echo "launch = true" >> "$launch_dir/cached-launch-layer.toml" + echo "cache = true" >> "$launch_dir/cached-launch-layer.toml" ln -snf "$launch_dir/cached-launch-layer" cached-deps fi @@ -38,6 +43,7 @@ cat < "$launch_dir/launch.toml" type = "web" command = "./run" args = ["8080"] + default = true [[processes]] type = "hello" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat index 2047dc714..dc0b208f4 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat @@ -8,7 +8,8 @@ echo making launch layer %launch_dir%\launch-layer mkdir %launch_dir%\launch-layer echo Launch Dep Contents > "%launch_dir%\launch-layer\launch-dep mklink /j launch-deps %launch_dir%\launch-layer -echo launch = true > %launch_dir%\launch-layer.toml +echo "[types]" > %launch_dir%\launch-layer.toml +echo launch = true >> %launch_dir%\launch-layer.toml :: makes a cached launch layer if not exist %launch_dir%\cached-launch-layer.toml ( @@ -16,10 +17,14 @@ if not exist %launch_dir%\cached-launch-layer.toml ( mkdir %launch_dir%\cached-launch-layer echo Cached Dep Contents > %launch_dir%\cached-launch-layer\cached-dep mklink /j cached-deps %launch_dir%\cached-launch-layer - echo launch = true > %launch_dir%\cached-launch-layer.toml + echo "[types]" > %launch_dir%\cached-launch-layer.toml + echo launch = true >> %launch_dir%\cached-launch-layer.toml echo cache = true >> %launch_dir%\cached-launch-layer.toml ) else ( echo reusing cached launch layer %launch_dir%\cached-launch-layer + echo "[types]" > %launch_dir%\cached-launch-layer.toml + echo launch = true >> %launch_dir%\cached-launch-layer.toml + echo cache = true >> %launch_dir%\cached-launch-layer.toml mklink /j cached-deps %launch_dir%\cached-launch-layer ) @@ -29,6 +34,7 @@ echo [[processes]] echo type = "web" echo command = '.\run' echo args = ["8080"] +echo default = true echo. echo [[processes]] echo type = "hello" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/buildpack.toml index 22b290e57..b772b61ab 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "simple/layers" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-extension/extension.toml b/acceptance/testdata/mock_buildpacks/simple-layers-extension/extension.toml index 1b397a8f7..9b780cd5d 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-extension/extension.toml +++ b/acceptance/testdata/mock_buildpacks/simple-layers-extension/extension.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [extension] id = "simple/layers" diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-parent-buildpack/buildpack.toml b/acceptance/testdata/mock_buildpacks/simple-layers-parent-buildpack/buildpack.toml index 46f3a39ea..a92d2c757 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-parent-buildpack/buildpack.toml +++ b/acceptance/testdata/mock_buildpacks/simple-layers-parent-buildpack/buildpack.toml @@ -1,4 +1,4 @@ -api = "0.2" +api = "0.7" [buildpack] id = "simple/layers/parent" From 175282ab089252a01cbbd9e065b3002f0eedde68 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Tue, 19 Sep 2023 17:41:44 -0400 Subject: [PATCH 2/2] Try to fix Windows Signed-off-by: Natalie Arellano --- acceptance/acceptance_test.go | 5 ++--- .../mock_buildpacks/read-env-buildpack/bin/build.bat | 4 ++-- .../simple-layers-buildpack-different-sha/bin/build.bat | 4 ++-- .../mock_buildpacks/simple-layers-buildpack/bin/build.bat | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 07e90a79f..da19ad6fd 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -798,15 +798,14 @@ func testAcceptance( // Linux containers (including Linux containers on Windows) extSimpleLayersDiffID := "sha256:d24758b8b75b13292746fe7a06666f28a9499da31826a60afe6ee6b8cba29b73" extReadEnvDiffID := "sha256:4490d78f2b056cdb99ad9cd3892f3c0617c5a485fb300dd90c572ce375ee45b2" - bpSimpleLayersDiffID := "sha256:ff38769b05fb483c8e24dade16476f7153707ef9cdcb3f43cdc8d2d65dbc66ae" - bpReadEnvDiffID := "sha256:b22ad0adcc5f9fb0d2bb358e6483e9f50f4375e659472217ff564cd8d11ea955" + bpSimpleLayersDiffID := "sha256:ade9da86859fa4ea50a513757f9b242bf1038667abf92dad3d018974a17f0ea7" + bpReadEnvDiffID := "sha256:db0797077ba8deff7054ab5578133b8f0206b6393de34b5bfd795cf50f6afdbd" // extensions assertImage.HasLabelWithData(builderName, "io.buildpacks.extension.layers", `{"read/env":{"read-env-version":{"api":"0.9","layerDiffID":"`+extReadEnvDiffID+`","name":"Read Env Extension"}},"simple/layers":{"simple-layers-version":{"api":"0.7","layerDiffID":"`+extSimpleLayersDiffID+`","name":"Simple Layers Extension"}}}`) assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.order-extensions", `[{"group":[{"id":"read/env","version":"read-env-version"},{"id":"simple/layers","version":"simple-layers-version"}]}]`) // buildpacks assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.layers", `{"read/env":{"read-env-version":{"api":"0.7","stacks":[{"id":"pack.test.stack"}],"layerDiffID":"`+bpReadEnvDiffID+`","name":"Read Env Buildpack"}},"simple/layers":{"simple-layers-version":{"api":"0.7","stacks":[{"id":"pack.test.stack"}],"layerDiffID":"`+bpSimpleLayersDiffID+`","name":"Simple Layers Buildpack"}}}`) assertImage.HasLabelWithData(builderName, "io.buildpacks.buildpack.order", `[{"group":[{"id":"read/env","version":"read-env-version","optional":true},{"id":"simple/layers","version":"simple-layers-version","optional":true}]}]`) - } }) diff --git a/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat b/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat index 9381683f5..e505dc98e 100644 --- a/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat +++ b/acceptance/testdata/mock_buildpacks/read-env-buildpack/bin/build.bat @@ -11,7 +11,7 @@ if exist %platform_dir%\env\ENV1_CONTENTS ( set /p contents=<%platform_dir%\env\ENV1_CONTENTS echo !contents!> %launch_dir%\env1-launch-layer\env1-launch-dep mklink /j env1-launch-deps %launch_dir%\env1-launch-layer - echo "[types]" > %launch_dir%\env1-launch-layer.toml + echo [types] > %launch_dir%\env1-launch-layer.toml echo launch = true >> %launch_dir%\env1-launch-layer.toml ) @@ -22,7 +22,7 @@ if exist %platform_dir%\env\ENV2_CONTENTS ( set /p contents=<%platform_dir%\env\ENV2_CONTENTS echo !contents!> %launch_dir%\env2-launch-layer\env2-launch-dep mklink /j env2-launch-deps %launch_dir%\env2-launch-layer - echo "[types]" > %launch_dir%\env2-launch-layer.toml + echo [types] > %launch_dir%\env2-launch-layer.toml echo launch = true >> %launch_dir%\env2-launch-layer.toml ) diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat index 37bd44ba7..be3e8497d 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack-different-sha/bin/build.bat @@ -8,7 +8,7 @@ echo making launch layer %launch_dir%\launch-layer mkdir %launch_dir%\launch-layer echo Launch Dep Contents > "%launch_dir%\launch-layer\launch-dep mklink /j launch-deps %launch_dir%\launch-layer -echo "[types]" > %launch_dir%\launch-layer.toml +echo [types] > %launch_dir%\launch-layer.toml echo launch = true >> %launch_dir%\launch-layer.toml :: makes a cached launch layer @@ -17,7 +17,7 @@ if not exist %launch_dir%\cached-launch-layer.toml ( mkdir %launch_dir%\cached-launch-layer echo Cached Dep Contents > %launch_dir%\cached-launch-layer\cached-dep mklink /j cached-deps %launch_dir%\cached-launch-layer - echo "[types]" > %launch_dir%\cached-launch-layer.toml + echo [types] > %launch_dir%\cached-launch-layer.toml echo launch = true >> %launch_dir%\cached-launch-layer.toml echo cache = true >> %launch_dir%\cached-launch-layer.toml ) else ( diff --git a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat index dc0b208f4..78fd79c8f 100644 --- a/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat +++ b/acceptance/testdata/mock_buildpacks/simple-layers-buildpack/bin/build.bat @@ -8,7 +8,7 @@ echo making launch layer %launch_dir%\launch-layer mkdir %launch_dir%\launch-layer echo Launch Dep Contents > "%launch_dir%\launch-layer\launch-dep mklink /j launch-deps %launch_dir%\launch-layer -echo "[types]" > %launch_dir%\launch-layer.toml +echo [types] > %launch_dir%\launch-layer.toml echo launch = true >> %launch_dir%\launch-layer.toml :: makes a cached launch layer @@ -17,12 +17,12 @@ if not exist %launch_dir%\cached-launch-layer.toml ( mkdir %launch_dir%\cached-launch-layer echo Cached Dep Contents > %launch_dir%\cached-launch-layer\cached-dep mklink /j cached-deps %launch_dir%\cached-launch-layer - echo "[types]" > %launch_dir%\cached-launch-layer.toml + echo [types] > %launch_dir%\cached-launch-layer.toml echo launch = true >> %launch_dir%\cached-launch-layer.toml echo cache = true >> %launch_dir%\cached-launch-layer.toml ) else ( echo reusing cached launch layer %launch_dir%\cached-launch-layer - echo "[types]" > %launch_dir%\cached-launch-layer.toml + echo [types] > %launch_dir%\cached-launch-layer.toml echo launch = true >> %launch_dir%\cached-launch-layer.toml echo cache = true >> %launch_dir%\cached-launch-layer.toml mklink /j cached-deps %launch_dir%\cached-launch-layer