mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Update default builder image
This commit updates the default builder image used by the Maven and Gradle plugins image-building goal and task to use the latest Paketo builder image. The builder image is pulled from Docker Hub instead of Google Container Registry by default. See gh-23628
This commit is contained in:
parent
3ff9628fe0
commit
461dc23c0c
@ -37,7 +37,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class BuildRequest {
|
||||
|
||||
static final String DEFAULT_BUILDER_IMAGE_NAME = "gcr.io/paketo-buildpacks/builder:base-platform-api-0.3";
|
||||
static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder:base";
|
||||
|
||||
private static final ImageReference DEFAULT_BUILDER = ImageReference.of(DEFAULT_BUILDER_IMAGE_NAME);
|
||||
|
||||
|
@ -105,7 +105,7 @@ The following table summarizes the available properties and their default values
|
||||
| `builder`
|
||||
| `--builder`
|
||||
| Name of the Builder image to use.
|
||||
| `gcr.io/paketo-buildpacks/builder:base-platform-api-0.3`
|
||||
| `paketobuildpacks/builder:base`
|
||||
|
||||
| `runImage`
|
||||
| `--runImage`
|
||||
|
@ -128,7 +128,7 @@ The following table summarizes the available parameters and their default values
|
||||
| `builder`
|
||||
| Name of the Builder image to use.
|
||||
| `spring-boot.build-image.builder`
|
||||
| `gcr.io/paketo-buildpacks/builder:base-platform-api-0.3`
|
||||
| `paketobuildpacks/builder:base`
|
||||
|
||||
| `runImage`
|
||||
| Name of the run image to use.
|
||||
|
@ -52,7 +52,7 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
||||
assertThat(jar).isFile();
|
||||
File original = new File(project, "target/build-image-0.0.1.BUILD-SNAPSHOT.jar.original");
|
||||
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("Successfully built image");
|
||||
ImageReference imageReference = ImageReference.of(ImageName.of("build-image"), "0.0.1.BUILD-SNAPSHOT");
|
||||
@ -94,13 +94,13 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
||||
mavenBuild.project("build-image").goals("package")
|
||||
.systemProperty("spring-boot.build-image.imageName", "example.com/test/cmd-property-name:v1")
|
||||
.systemProperty("spring-boot.build-image.builder",
|
||||
"gcr.io/paketo-buildpacks/builder:full-cf-platform-api-0.3")
|
||||
.systemProperty("spring-boot.build-image.runImage", "gcr.io/paketo-buildpacks/run:full-cnb-cf")
|
||||
"paketobuildpacks/builder:full")
|
||||
.systemProperty("spring-boot.build-image.runImage", "paketobuildpacks/run:full-cnb")
|
||||
.execute((project) -> {
|
||||
assertThat(buildLog(project)).contains("Building image")
|
||||
.contains("example.com/test/cmd-property-name:v1")
|
||||
.contains("paketo-buildpacks/builder:full-cf-platform-api-0.3")
|
||||
.contains("paketo-buildpacks/run:full-cnb-cf").contains("Successfully built image");
|
||||
.contains("paketobuildpacks/builder:full")
|
||||
.contains("paketobuildpacks/run:full-cnb").contains("Successfully built image");
|
||||
ImageReference imageReference = ImageReference.of("example.com/test/cmd-property-name:v1");
|
||||
try (GenericContainer<?> container = new GenericContainer<>(imageReference.toString())) {
|
||||
container.waitingFor(Wait.forLogMessage("Launched\\n", 1)).start();
|
||||
@ -115,8 +115,8 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
||||
void whenBuildImageIsInvokedWithCustomBuilderImageAndRunImage(MavenBuild mavenBuild) {
|
||||
mavenBuild.project("build-image-custom-builder").goals("package").execute((project) -> {
|
||||
assertThat(buildLog(project)).contains("Building image")
|
||||
.contains("paketo-buildpacks/builder:full-cf-platform-api-0.3")
|
||||
.contains("paketo-buildpacks/run:full-cnb-cf")
|
||||
.contains("paketobuildpacks/builder:full")
|
||||
.contains("paketobuildpacks/run:full-cnb")
|
||||
.contains("docker.io/library/build-image-v2-builder:0.0.1.BUILD-SNAPSHOT")
|
||||
.contains("Successfully built image");
|
||||
ImageReference imageReference = ImageReference
|
||||
@ -134,7 +134,7 @@ public class BuildImageTests extends AbstractArchiveIntegrationTests {
|
||||
void whenBuildImageIsInvokedWithEmptyEnvEntry(MavenBuild mavenBuild) {
|
||||
mavenBuild.project("build-image-empty-env-entry").goals("package").prepare(this::writeLongNameResource)
|
||||
.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("Successfully built image");
|
||||
ImageReference imageReference = ImageReference.of(ImageName.of("build-image-empty-env-entry"),
|
||||
|
@ -23,8 +23,8 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<image>
|
||||
<builder>gcr.io/paketo-buildpacks/builder:full-cf-platform-api-0.3</builder>
|
||||
<runImage>gcr.io/paketo-buildpacks/run:full-cnb-cf</runImage>
|
||||
<builder>paketobuildpacks/builder:full</builder>
|
||||
<runImage>paketobuildpacks/run:full-cnb</runImage>
|
||||
</image>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -59,7 +59,7 @@ class ImageTests {
|
||||
void getBuildRequestWhenNoCustomizationsUsesDefaults() {
|
||||
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
|
||||
assertThat(request.getName().toString()).isEqualTo("docker.io/library/my-app:0.0.1-SNAPSHOT");
|
||||
assertThat(request.getBuilder().toString()).contains("paketo-buildpacks/builder");
|
||||
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder");
|
||||
assertThat(request.getRunImage()).isNull();
|
||||
assertThat(request.getEnv()).isEmpty();
|
||||
assertThat(request.isCleanCache()).isFalse();
|
||||
|
Loading…
Reference in New Issue
Block a user