Revert "Upgrade default CNB builders to Paketo Jammy"

This reverts commit 6506208d29. The
upgrade to the Jammy builder was causing
failsWhenBuildImageIsInvokedOnMultiModuleProjectWithBuildImageGoal to
hang on CI.

See gh-36689
pull/36778/head
Andy Wilkinson 1 year ago
parent 9d42cff472
commit b1d26fe961

@ -185,7 +185,8 @@ resources:
type: registry-image
icon: docker
source:
repository: paketobuildpacks/builder-jammy-base
repository: paketobuildpacks/builder
tag: base
- name: artifactory-repo
type: artifactory-resource
icon: package-variant

@ -32,7 +32,7 @@ This means you can just type a single command and quickly get a sensible image i
The resulting image doesn't contain a JVM, instead the native image is compiled statically.
This leads to smaller images.
NOTE: The builder used for the images is `paketobuildpacks/builder-jammy-tiny`.
NOTE: The builder used for the images is `paketobuildpacks/builder:tiny`.
It has small footprint and reduced attack surface, but you can also use `paketobuildpacks/builder-jammy-base` or `paketobuildpacks/builder-jammy-full` to have more tools available in the image if required.

@ -249,7 +249,7 @@ publishing.publications.withType(MavenPublication) {
delegate.artifactId('spring-boot-maven-plugin')
configuration {
image {
delegate.builder("paketobuildpacks/builder-jammy-tiny");
delegate.builder("paketobuildpacks/builder:tiny");
env {
delegate.BP_NATIVE_IMAGE("true")
}

@ -45,7 +45,7 @@ import org.springframework.util.Assert;
*/
public class BuildRequest {
static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder-jammy-base";
static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder:base";
private static final ImageReference DEFAULT_BUILDER = ImageReference.of(DEFAULT_BUILDER_IMAGE_NAME);

@ -115,7 +115,7 @@ The following table summarizes the available properties and their default values
| `builder`
| `--builder`
| Name of the Builder image to use.
| `paketobuildpacks/builder-jammy-base` or `paketobuildpacks/builder-jammy-tiny` when {nbt-gradle-plugin}[GraalVM Native Image plugin] is applied.
| `paketobuildpacks/builder:base` or `paketobuildpacks/builder:tiny` when {nbt-gradle-plugin}[GraalVM Native Image plugin] is applied.
| `runImage`
| `--runImage`

@ -81,6 +81,6 @@ When the {nbt-gradle-plugin}[GraalVM Native Image plugin] is applied to a projec
. Configures the GraalVM extension to disable Toolchain detection.
. Configures each GraalVM native binary to require GraalVM 22.3 or later.
. Configures the `bootJar` task to include the reachability metadata produced by the `collectReachabilityMetadata` task in its jar.
. Configures the `bootBuildImage` task to use `paketobuildpacks/builder-jammy-tiny` as its builder and to set `BP_NATIVE_IMAGE` to `true` in its environment.
. Configures the `bootBuildImage` task to use `paketobuildpacks/builder:tiny` as its builder and to set `BP_NATIVE_IMAGE` to `true` in its environment.

@ -115,7 +115,7 @@ class NativeImagePluginAction implements PluginApplicationAction {
project.getTasks()
.named(SpringBootPlugin.BOOT_BUILD_IMAGE_TASK_NAME, BootBuildImage.class)
.configure((bootBuildImage) -> {
bootBuildImage.getBuilder().convention("paketobuildpacks/builder-jammy-tiny");
bootBuildImage.getBuilder().convention("paketobuildpacks/builder:tiny");
bootBuildImage.getEnvironment().put("BP_NATIVE_IMAGE", "true");
});
}

@ -93,8 +93,7 @@ class NativeImagePluginActionIntegrationTests {
writeDummySpringApplicationAotProcessorMainClass();
BuildResult result = this.gradleBuild.expectDeprecationWarningsWithAtLeastVersion("8.2-rc-1")
.build("bootBuildImageConfiguration");
assertThat(result.getOutput()).contains("paketobuildpacks/builder-jammy-tiny")
.contains("BP_NATIVE_IMAGE = true");
assertThat(result.getOutput()).contains("paketobuildpacks/builder:tiny").contains("BP_NATIVE_IMAGE = true");
}
@TestTemplate

@ -171,8 +171,7 @@ class BootBuildImageTests {
@Test
void whenNoBuilderIsConfiguredThenRequestHasDefaultBuilder() {
assertThat(this.buildImage.createRequest().getBuilder().getName())
.isEqualTo("paketobuildpacks/builder-jammy-base");
assertThat(this.buildImage.createRequest().getBuilder().getName()).isEqualTo("paketobuildpacks/builder");
}
@Test

@ -131,7 +131,7 @@ The following table summarizes the available parameters and their default values
| `builder` +
(`spring-boot.build-image.builder`)
| Name of the Builder image to use.
| `paketobuildpacks/builder-jammy-base`
| `paketobuildpacks/builder:base`
| `runImage` +
(`spring-boot.build-image.runImage`)

@ -67,7 +67,7 @@ class ImageTests {
void getBuildRequestWhenNoCustomizationsUsesDefaults() {
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName()).hasToString("docker.io/library/my-app:0.0.1-SNAPSHOT");
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder-jammy-base");
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder");
assertThat(request.getRunImage()).isNull();
assertThat(request.getEnv()).isEmpty();
assertThat(request.isCleanCache()).isFalse();

Loading…
Cancel
Save