diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java index dd6cbd4b69..f3cc475aa5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Phase.java @@ -30,6 +30,7 @@ import org.springframework.util.StringUtils; * An individual build phase executed as part of a {@link Lifecycle} run. * * @author Phillip Webb + * @author Scott Frederick */ class Phase { @@ -112,7 +113,7 @@ class Phase { update.withUser("root"); update.withBind(DOMAIN_SOCKET_PATH, DOMAIN_SOCKET_PATH); } - update.withCommand("/lifecycle/" + this.name, StringUtils.toStringArray(this.args)); + update.withCommand("/cnb/lifecycle/" + this.name, StringUtils.toStringArray(this.args)); update.withLabel("author", "spring-boot"); this.binds.forEach(update::withBind); } 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 d97fccbaa2..8219640663 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 @@ -190,7 +190,7 @@ class LifecycleTests { } private void assertPhaseWasRun(String name, IOConsumer configConsumer) throws IOException { - ContainerReference containerReference = ContainerReference.of("lifecycle-" + name); + ContainerReference containerReference = ContainerReference.of("cnb-lifecycle-" + name); verify(this.docker.container()).start(containerReference); verify(this.docker.container()).logs(eq(containerReference), any()); verify(this.docker.container()).remove(containerReference, true); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/PhaseTests.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/PhaseTests.java index d39434c767..60df1db5be 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/PhaseTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/PhaseTests.java @@ -30,6 +30,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; * Tests for {@link Phase}. * * @author Phillip Webb + * @author Scott Frederick */ class PhaseTests { @@ -52,7 +53,7 @@ class PhaseTests { Phase phase = new Phase("test", false); Update update = mock(Update.class); phase.apply(update); - verify(update).withCommand("/lifecycle/test", NO_ARGS); + verify(update).withCommand("/cnb/lifecycle/test", NO_ARGS); verify(update).withLabel("author", "spring-boot"); verifyNoMoreInteractions(update); } @@ -65,7 +66,7 @@ class PhaseTests { phase.apply(update); verify(update).withUser("root"); verify(update).withBind("/var/run/docker.sock", "/var/run/docker.sock"); - verify(update).withCommand("/lifecycle/test", NO_ARGS); + verify(update).withCommand("/cnb/lifecycle/test", NO_ARGS); verify(update).withLabel("author", "spring-boot"); verifyNoMoreInteractions(update); } @@ -76,7 +77,7 @@ class PhaseTests { phase.withLogLevelArg(); Update update = mock(Update.class); phase.apply(update); - verify(update).withCommand("/lifecycle/test", "-log-level", "debug"); + verify(update).withCommand("/cnb/lifecycle/test", "-log-level", "debug"); verify(update).withLabel("author", "spring-boot"); verifyNoMoreInteractions(update); } @@ -87,7 +88,7 @@ class PhaseTests { phase.withLogLevelArg(); Update update = mock(Update.class); phase.apply(update); - verify(update).withCommand("/lifecycle/test"); + verify(update).withCommand("/cnb/lifecycle/test"); verify(update).withLabel("author", "spring-boot"); verifyNoMoreInteractions(update); } @@ -98,7 +99,7 @@ class PhaseTests { phase.withArgs("a", "b", "c"); Update update = mock(Update.class); phase.apply(update); - verify(update).withCommand("/lifecycle/test", "a", "b", "c"); + verify(update).withCommand("/cnb/lifecycle/test", "a", "b", "c"); verify(update).withLabel("author", "spring-boot"); verifyNoMoreInteractions(update); } @@ -110,7 +111,7 @@ class PhaseTests { phase.withBinds(volumeName, "/test"); Update update = mock(Update.class); phase.apply(update); - verify(update).withCommand("/lifecycle/test"); + verify(update).withCommand("/cnb/lifecycle/test"); verify(update).withLabel("author", "spring-boot"); verify(update).withBind(volumeName, "/test"); verifyNoMoreInteractions(update); 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 dbbb51dda5..4f1401b86b 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,7 +1,7 @@ { "User" : "root", "Image" : "pack.local/ephemeral-builder", - "Cmd" : [ "/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" ], + "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" ], "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.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 7f5c288341..3a70423361 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,7 +1,7 @@ { "User" : "root", "Image" : "pack.local/ephemeral-builder", - "Cmd" : [ "/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" ], + "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" ], "Labels" : { "author" : "spring-boot" },