|
|
@ -52,7 +52,7 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
|
|
|
assertThat(jar).isFile();
|
|
|
|
assertThat(jar).isFile();
|
|
|
|
File original = new File(project, "target/build-image-0.0.1.BUILD-SNAPSHOT.jar.original");
|
|
|
|
File original = new File(project, "target/build-image-0.0.1.BUILD-SNAPSHOT.jar.original");
|
|
|
|
assertThat(original).doesNotExist();
|
|
|
|
assertThat(original).doesNotExist();
|
|
|
|
assertThat(buildLog(project)).contains("Building image").contains("paketo-buildpacks/builder")
|
|
|
|
assertThat(buildLog(project)).contains("Building image").contains("paketobuildpacks/builder")
|
|
|
|
.contains("docker.io/library/build-image:0.0.1.BUILD-SNAPSHOT")
|
|
|
|
.contains("docker.io/library/build-image:0.0.1.BUILD-SNAPSHOT")
|
|
|
|
.contains("Successfully built image");
|
|
|
|
.contains("Successfully built image");
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("build-image"), "0.0.1.BUILD-SNAPSHOT");
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("build-image"), "0.0.1.BUILD-SNAPSHOT");
|
|
|
@ -93,14 +93,12 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
|
|
|
void whenBuildImageIsInvokedWithCommandLineParameters(MavenBuild mavenBuild) {
|
|
|
|
void whenBuildImageIsInvokedWithCommandLineParameters(MavenBuild mavenBuild) {
|
|
|
|
mavenBuild.project("build-image").goals("package")
|
|
|
|
mavenBuild.project("build-image").goals("package")
|
|
|
|
.systemProperty("spring-boot.build-image.imageName", "example.com/test/cmd-property-name:v1")
|
|
|
|
.systemProperty("spring-boot.build-image.imageName", "example.com/test/cmd-property-name:v1")
|
|
|
|
.systemProperty("spring-boot.build-image.builder",
|
|
|
|
.systemProperty("spring-boot.build-image.builder", "paketobuildpacks/builder:full")
|
|
|
|
"gcr.io/paketo-buildpacks/builder:full-cf-platform-api-0.3")
|
|
|
|
.systemProperty("spring-boot.build-image.runImage", "paketobuildpacks/run:full-cnb")
|
|
|
|
.systemProperty("spring-boot.build-image.runImage", "gcr.io/paketo-buildpacks/run:full-cnb-cf")
|
|
|
|
|
|
|
|
.execute((project) -> {
|
|
|
|
.execute((project) -> {
|
|
|
|
assertThat(buildLog(project)).contains("Building image")
|
|
|
|
assertThat(buildLog(project)).contains("Building image")
|
|
|
|
.contains("example.com/test/cmd-property-name:v1")
|
|
|
|
.contains("example.com/test/cmd-property-name:v1").contains("paketobuildpacks/builder:full")
|
|
|
|
.contains("paketo-buildpacks/builder:full-cf-platform-api-0.3")
|
|
|
|
.contains("paketobuildpacks/run:full").contains("Successfully built image");
|
|
|
|
.contains("paketo-buildpacks/run:full-cnb-cf").contains("Successfully built image");
|
|
|
|
|
|
|
|
ImageReference imageReference = ImageReference.of("example.com/test/cmd-property-name:v1");
|
|
|
|
ImageReference imageReference = ImageReference.of("example.com/test/cmd-property-name:v1");
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
|
|
|
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
|
|
|
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
|
|
|
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
|
|
@ -114,9 +112,8 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
|
|
|
@TestTemplate
|
|
|
|
@TestTemplate
|
|
|
|
void whenBuildImageIsInvokedWithCustomBuilderImageAndRunImage(MavenBuild mavenBuild) {
|
|
|
|
void whenBuildImageIsInvokedWithCustomBuilderImageAndRunImage(MavenBuild mavenBuild) {
|
|
|
|
mavenBuild.project("build-image-custom-builder").goals("package").execute((project) -> {
|
|
|
|
mavenBuild.project("build-image-custom-builder").goals("package").execute((project) -> {
|
|
|
|
assertThat(buildLog(project)).contains("Building image")
|
|
|
|
assertThat(buildLog(project)).contains("Building image").contains("paketobuildpacks/builder:full")
|
|
|
|
.contains("paketo-buildpacks/builder:full-cf-platform-api-0.3")
|
|
|
|
.contains("paketobuildpacks/run:full")
|
|
|
|
.contains("paketo-buildpacks/run:full-cnb-cf")
|
|
|
|
|
|
|
|
.contains("docker.io/library/build-image-v2-builder:0.0.1.BUILD-SNAPSHOT")
|
|
|
|
.contains("docker.io/library/build-image-v2-builder:0.0.1.BUILD-SNAPSHOT")
|
|
|
|
.contains("Successfully built image");
|
|
|
|
.contains("Successfully built image");
|
|
|
|
ImageReference imageReference = ImageReference
|
|
|
|
ImageReference imageReference = ImageReference
|
|
|
@ -134,7 +131,7 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
|
|
|
void whenBuildImageIsInvokedWithEmptyEnvEntry(MavenBuild mavenBuild) {
|
|
|
|
void whenBuildImageIsInvokedWithEmptyEnvEntry(MavenBuild mavenBuild) {
|
|
|
|
mavenBuild.project("build-image-empty-env-entry").goals("package").prepare(this::writeLongNameResource)
|
|
|
|
mavenBuild.project("build-image-empty-env-entry").goals("package").prepare(this::writeLongNameResource)
|
|
|
|
.execute((project) -> {
|
|
|
|
.execute((project) -> {
|
|
|
|
assertThat(buildLog(project)).contains("Building image").contains("paketo-buildpacks/builder")
|
|
|
|
assertThat(buildLog(project)).contains("Building image").contains("paketobuildpacks/builder")
|
|
|
|
.contains("docker.io/library/build-image-empty-env-entry:0.0.1.BUILD-SNAPSHOT")
|
|
|
|
.contains("docker.io/library/build-image-empty-env-entry:0.0.1.BUILD-SNAPSHOT")
|
|
|
|
.contains("Successfully built image");
|
|
|
|
.contains("Successfully built image");
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("build-image-empty-env-entry"),
|
|
|
|
ImageReference imageReference = ImageReference.of(ImageName.of("build-image-empty-env-entry"),
|
|
|
|