From 5f14cffea3fe6240d7c21ca72725f4b69ff6575e Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Wed, 1 Dec 2021 12:13:32 -0600 Subject: [PATCH] Add support for CNB platform API 0.5 through 0.8 Fixes gh-28850 --- .../buildpack/platform/build/ApiVersion.java | 19 ++++++++- .../buildpack/platform/build/ApiVersions.java | 5 ++- .../buildpack/platform/build/Lifecycle.java | 2 +- .../platform/build/ApiVersionTests.java | 23 ++++++++-- .../platform/build/BuilderMetadataTests.java | 7 ++-- .../platform/build/LifecycleTests.java | 6 +-- .../builder-metadata-supported-apis.json | 12 ++++-- .../builder-metadata-unsupported-apis.json | 6 +-- .../platform/build/builder-metadata.json | 2 +- .../build/lifecycle-creator-bindings.json | 42 +++++++++++++++---- .../lifecycle-creator-cache-volumes.json | 3 +- .../build/lifecycle-creator-clean-cache.json | 41 ++++++++++++++---- .../build/lifecycle-creator-network.json | 42 +++++++++++++++---- .../platform/build/lifecycle-creator.json | 40 ++++++++++++++---- 14 files changed, 193 insertions(+), 57 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersion.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersion.java index 789264fe6e..6673768113 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersion.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersion.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,7 +73,7 @@ final class ApiVersion { * the same version number. A 1.x or higher release matches when the versions have the * same major version and a minor that is equal or greater. * @param other the version to check against - * @return if the specified API is supported + * @return if the specified API version is supported * @see #assertSupports(ApiVersion) */ boolean supports(ApiVersion other) { @@ -86,6 +86,21 @@ final class ApiVersion { return this.minor >= other.minor; } + /** + * Returns if this API version supports any of the given versions. + * @param others the versions to check against + * @return if any of the specified API versions are supported + * @see #supports(ApiVersion) + */ + boolean supportsAny(ApiVersion... others) { + for (ApiVersion other : others) { + if (supports(other)) { + return true; + } + } + return false; + } + @Override public boolean equals(Object obj) { if (this == obj) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersions.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersions.java index 9257bfed72..fdbef611d6 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersions.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ final class ApiVersions { /** * The platform API versions supported by this release. */ - static final ApiVersions SUPPORTED_PLATFORMS = new ApiVersions(ApiVersion.of(0, 3), ApiVersion.of(0, 4)); + static final ApiVersions SUPPORTED_PLATFORMS = new ApiVersions(ApiVersion.of(0, 3), ApiVersion.of(0, 4), + ApiVersion.of(0, 5), ApiVersion.of(0, 6), ApiVersion.of(0, 7), ApiVersion.of(0, 8)); private final ApiVersion[] apiVersions; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Lifecycle.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Lifecycle.java index c7162c6d21..8fa7f390d4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Lifecycle.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Lifecycle.java @@ -181,7 +181,7 @@ class Lifecycle implements Closeable { } private boolean requiresProcessTypeDefault() { - return this.platformVersion.supports(ApiVersion.of(0, 4)); + return this.platformVersion.supportsAny(ApiVersion.of(0, 4), ApiVersion.of(0, 5)); } private void run(Phase phase) throws IOException { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/ApiVersionTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/ApiVersionTests.java index e679b5bedd..26b9c2e4db 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/ApiVersionTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/ApiVersionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,8 @@ package org.springframework.boot.buildpack.platform.build; +import java.util.Arrays; + import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -68,7 +70,7 @@ class ApiVersionTests { } @Test - void supportWhenSame() { + void supportsWhenSame() { assertThat(supports("0.0", "0.0")).isTrue(); assertThat(supports("0.1", "0.1")).isTrue(); assertThat(supports("1.0", "1.0")).isTrue(); @@ -92,11 +94,21 @@ class ApiVersionTests { } @Test - void supportWhenMajorZeroAndDifferentMinor() { + void supportsWhenMajorZeroAndDifferentMinor() { assertThat(supports("0.2", "0.1")).isFalse(); assertThat(supports("0.2", "0.3")).isFalse(); } + @Test + void supportsAnyWhenOneMatches() { + assertThat(supportsAny("0.2", "0.1", "0.2")).isTrue(); + } + + @Test + void supportsAnyWhenNoneMatch() { + assertThat(supportsAny("0.2", "0.3", "0.4")).isFalse(); + } + @Test void toStringReturnsString() { assertThat(ApiVersion.parse("1.2").toString()).isEqualTo("1.2"); @@ -115,4 +127,9 @@ class ApiVersionTests { return ApiVersion.parse(v1).supports(ApiVersion.parse(v2)); } + private boolean supportsAny(String v1, String... others) { + return ApiVersion.parse(v1) + .supportsAny(Arrays.stream(others).map(ApiVersion::parse).toArray(ApiVersion[]::new)); + } + } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderMetadataTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderMetadataTests.java index ccb0ac23cd..b7dd6bf767 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderMetadataTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/BuilderMetadataTests.java @@ -92,7 +92,7 @@ class BuilderMetadataTests extends AbstractJsonTests { assertThat(metadata.getStack().getRunImage().getMirrors()).isEmpty(); assertThat(metadata.getLifecycle().getVersion()).isEqualTo("0.7.2"); assertThat(metadata.getLifecycle().getApi().getBuildpack()).isEqualTo("0.2"); - assertThat(metadata.getLifecycle().getApi().getPlatform()).isEqualTo("0.4"); + assertThat(metadata.getLifecycle().getApi().getPlatform()).isEqualTo("0.8"); assertThat(metadata.getLifecycle().getApis().getBuildpack()).isNull(); assertThat(metadata.getLifecycle().getApis().getPlatform()).isNull(); } @@ -102,9 +102,10 @@ class BuilderMetadataTests extends AbstractJsonTests { BuilderMetadata metadata = BuilderMetadata.fromJson(getContentAsString("builder-metadata-supported-apis.json")); assertThat(metadata.getLifecycle().getVersion()).isEqualTo("0.7.2"); assertThat(metadata.getLifecycle().getApi().getBuildpack()).isEqualTo("0.2"); - assertThat(metadata.getLifecycle().getApi().getPlatform()).isEqualTo("0.4"); + assertThat(metadata.getLifecycle().getApi().getPlatform()).isEqualTo("0.8"); assertThat(metadata.getLifecycle().getApis().getBuildpack()).containsExactly("0.1", "0.2", "0.3"); - assertThat(metadata.getLifecycle().getApis().getPlatform()).containsExactly("0.3", "0.4"); + assertThat(metadata.getLifecycle().getApis().getPlatform()).containsExactly("0.3", "0.4", "0.5", "0.6", "0.7", + "0.8"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java index 9dcee73f90..b6e4af0b3b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/LifecycleTests.java @@ -159,8 +159,8 @@ class LifecycleTests { given(this.docker.container().create(any(), any())).willAnswer(answerWithGeneratedContainerId()); given(this.docker.container().wait(any())).willReturn(ContainerStatus.of(0, null)); assertThatIllegalStateException() - .isThrownBy(() -> createLifecycle("builder-metadata-unsupported-api.json").execute()) - .withMessage("Detected platform API versions '0.2' are not included in supported versions '0.3,0.4'"); + .isThrownBy(() -> createLifecycle("builder-metadata-unsupported-api.json").execute()).withMessage( + "Detected platform API versions '0.2' are not included in supported versions '0.3,0.4,0.5,0.6,0.7,0.8'"); } @Test @@ -170,7 +170,7 @@ class LifecycleTests { given(this.docker.container().wait(any())).willReturn(ContainerStatus.of(0, null)); assertThatIllegalStateException() .isThrownBy(() -> createLifecycle("builder-metadata-unsupported-apis.json").execute()).withMessage( - "Detected platform API versions '0.5,0.6' are not included in supported versions '0.3,0.4'"); + "Detected platform API versions '0.1,0.2' are not included in supported versions '0.3,0.4,0.5,0.6,0.7,0.8'"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-supported-apis.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-supported-apis.json index 4a695f9766..4d5cb74247 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-supported-apis.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-supported-apis.json @@ -16,7 +16,7 @@ "version": "0.7.2", "api": { "buildpack": "0.2", - "platform": "0.4" + "platform": "0.8" }, "apis": { "buildpack": { @@ -30,9 +30,13 @@ "platform": { "deprecated": [], "supported": [ - "0.3", - "0.4" - ] + "0.3", + "0.4", + "0.5", + "0.6", + "0.7", + "0.8" + ] } } }, diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-unsupported-apis.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-unsupported-apis.json index 74f94029ce..1dbf590155 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-unsupported-apis.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata-unsupported-apis.json @@ -30,9 +30,9 @@ "platform": { "deprecated": [], "supported": [ - "0.5", - "0.6" - ] + "0.1", + "0.2" + ] } } }, diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata.json index b2470b87a3..6142679034 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/builder-metadata.json @@ -182,7 +182,7 @@ "version": "0.7.2", "api": { "buildpack": "0.2", - "platform": "0.4" + "platform": "0.8" } }, "createdBy": { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-bindings.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-bindings.json index b3a33778d3..2a2774f3ef 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-bindings.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-bindings.json @@ -1,12 +1,38 @@ { - "User" : "root", - "Image" : "pack.local/ephemeral-builder", - "Cmd" : [ "/cnb/lifecycle/creator", "-app", "/workspace", "-platform", "/platform", "-run-image", "docker.io/cloudfoundry/run:latest", "-layers", "/layers", "-cache-dir", "/cache", "-launch-cache", "/launch-cache", "-daemon", "-process-type=web", "docker.io/library/my-application:latest" ], - "Env" : [ "CNB_PLATFORM_API=0.4" ], - "Labels" : { - "author" : "spring-boot" + "User": "root", + "Image": "pack.local/ephemeral-builder", + "Cmd": [ + "/cnb/lifecycle/creator", + "-app", + "/workspace", + "-platform", + "/platform", + "-run-image", + "docker.io/cloudfoundry/run:latest", + "-layers", + "/layers", + "-cache-dir", + "/cache", + "-launch-cache", + "/launch-cache", + "-daemon", + "docker.io/library/my-application:latest" + ], + "Env": [ + "CNB_PLATFORM_API=0.8" + ], + "Labels": { + "author": "spring-boot" }, - "HostConfig" : { - "Binds" : [ "/var/run/docker.sock:/var/run/docker.sock", "pack-layers-aaaaaaaaaa:/layers", "pack-app-aaaaaaaaaa:/workspace", "pack-cache-b35197ac41ea.build:/cache", "pack-cache-b35197ac41ea.launch:/launch-cache", "/host/src/path:/container/dest/path:ro", "volume-name:/container/volume/path:rw" ] + "HostConfig": { + "Binds": [ + "/var/run/docker.sock:/var/run/docker.sock", + "pack-layers-aaaaaaaaaa:/layers", + "pack-app-aaaaaaaaaa:/workspace", + "pack-cache-b35197ac41ea.build:/cache", + "pack-cache-b35197ac41ea.launch:/launch-cache", + "/host/src/path:/container/dest/path:ro", + "volume-name:/container/volume/path:rw" + ] } } \ No newline at end of file diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-cache-volumes.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-cache-volumes.json index 07d53944b6..ae16fba38c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-cache-volumes.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-cache-volumes.json @@ -16,11 +16,10 @@ "-launch-cache", "/launch-cache", "-daemon", - "-process-type=web", "docker.io/library/my-application:latest" ], "Env": [ - "CNB_PLATFORM_API=0.4" + "CNB_PLATFORM_API=0.8" ], "Labels": { "author": "spring-boot" diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-clean-cache.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-clean-cache.json index 481f406c76..cfb41fe5bf 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-clean-cache.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-clean-cache.json @@ -1,12 +1,37 @@ { - "User" : "root", - "Image" : "pack.local/ephemeral-builder", - "Cmd" : [ "/cnb/lifecycle/creator", "-app", "/workspace", "-platform", "/platform", "-run-image", "docker.io/cloudfoundry/run:latest", "-layers", "/layers", "-cache-dir", "/cache", "-launch-cache", "/launch-cache", "-daemon", "-skip-restore", "-process-type=web", "docker.io/library/my-application:latest" ], - "Env" : [ "CNB_PLATFORM_API=0.4" ], - "Labels" : { - "author" : "spring-boot" + "User": "root", + "Image": "pack.local/ephemeral-builder", + "Cmd": [ + "/cnb/lifecycle/creator", + "-app", + "/workspace", + "-platform", + "/platform", + "-run-image", + "docker.io/cloudfoundry/run:latest", + "-layers", + "/layers", + "-cache-dir", + "/cache", + "-launch-cache", + "/launch-cache", + "-daemon", + "-skip-restore", + "docker.io/library/my-application:latest" + ], + "Env": [ + "CNB_PLATFORM_API=0.8" + ], + "Labels": { + "author": "spring-boot" }, - "HostConfig" : { - "Binds" : [ "/var/run/docker.sock:/var/run/docker.sock", "pack-layers-aaaaaaaaaa:/layers", "pack-app-aaaaaaaaaa:/workspace", "pack-cache-b35197ac41ea.build:/cache", "pack-cache-b35197ac41ea.launch:/launch-cache" ] + "HostConfig": { + "Binds": [ + "/var/run/docker.sock:/var/run/docker.sock", + "pack-layers-aaaaaaaaaa:/layers", + "pack-app-aaaaaaaaaa:/workspace", + "pack-cache-b35197ac41ea.build:/cache", + "pack-cache-b35197ac41ea.launch:/launch-cache" + ] } } \ No newline at end of file diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-network.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-network.json index ae6ab807d1..868521e5c3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-network.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator-network.json @@ -1,13 +1,37 @@ { - "User" : "root", - "Image" : "pack.local/ephemeral-builder", - "Cmd" : [ "/cnb/lifecycle/creator", "-app", "/workspace", "-platform", "/platform", "-run-image", "docker.io/cloudfoundry/run:latest", "-layers", "/layers", "-cache-dir", "/cache", "-launch-cache", "/launch-cache", "-daemon", "-process-type=web", "docker.io/library/my-application:latest" ], - "Env" : [ "CNB_PLATFORM_API=0.4" ], - "Labels" : { - "author" : "spring-boot" + "User": "root", + "Image": "pack.local/ephemeral-builder", + "Cmd": [ + "/cnb/lifecycle/creator", + "-app", + "/workspace", + "-platform", + "/platform", + "-run-image", + "docker.io/cloudfoundry/run:latest", + "-layers", + "/layers", + "-cache-dir", + "/cache", + "-launch-cache", + "/launch-cache", + "-daemon", + "docker.io/library/my-application:latest" + ], + "Env": [ + "CNB_PLATFORM_API=0.8" + ], + "Labels": { + "author": "spring-boot" }, - "HostConfig" : { - "NetworkMode" : "test", - "Binds" : [ "/var/run/docker.sock:/var/run/docker.sock", "pack-layers-aaaaaaaaaa:/layers", "pack-app-aaaaaaaaaa:/workspace", "pack-cache-b35197ac41ea.build:/cache", "pack-cache-b35197ac41ea.launch:/launch-cache" ] + "HostConfig": { + "NetworkMode": "test", + "Binds": [ + "/var/run/docker.sock:/var/run/docker.sock", + "pack-layers-aaaaaaaaaa:/layers", + "pack-app-aaaaaaaaaa:/workspace", + "pack-cache-b35197ac41ea.build:/cache", + "pack-cache-b35197ac41ea.launch:/launch-cache" + ] } } \ No newline at end of file diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator.json b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator.json index 916fa52f8f..57adda7224 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator.json +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/build/lifecycle-creator.json @@ -1,12 +1,36 @@ { - "User" : "root", - "Image" : "pack.local/ephemeral-builder", - "Cmd" : [ "/cnb/lifecycle/creator", "-app", "/workspace", "-platform", "/platform", "-run-image", "docker.io/cloudfoundry/run:latest", "-layers", "/layers", "-cache-dir", "/cache", "-launch-cache", "/launch-cache", "-daemon", "-process-type=web", "docker.io/library/my-application:latest" ], - "Env" : [ "CNB_PLATFORM_API=0.4" ], - "Labels" : { - "author" : "spring-boot" + "User": "root", + "Image": "pack.local/ephemeral-builder", + "Cmd": [ + "/cnb/lifecycle/creator", + "-app", + "/workspace", + "-platform", + "/platform", + "-run-image", + "docker.io/cloudfoundry/run:latest", + "-layers", + "/layers", + "-cache-dir", + "/cache", + "-launch-cache", + "/launch-cache", + "-daemon", + "docker.io/library/my-application:latest" + ], + "Env": [ + "CNB_PLATFORM_API=0.8" + ], + "Labels": { + "author": "spring-boot" }, - "HostConfig" : { - "Binds" : [ "/var/run/docker.sock:/var/run/docker.sock", "pack-layers-aaaaaaaaaa:/layers", "pack-app-aaaaaaaaaa:/workspace", "pack-cache-b35197ac41ea.build:/cache", "pack-cache-b35197ac41ea.launch:/launch-cache" ] + "HostConfig": { + "Binds": [ + "/var/run/docker.sock:/var/run/docker.sock", + "pack-layers-aaaaaaaaaa:/layers", + "pack-app-aaaaaaaaaa:/workspace", + "pack-cache-b35197ac41ea.build:/cache", + "pack-cache-b35197ac41ea.launch:/launch-cache" + ] } } \ No newline at end of file