Skip to content

Commit

Permalink
Revert "Upgrade default CNB builders to Paketo Jammy"
Browse files Browse the repository at this point in the history
This reverts commit 6506208. The
upgrade to the Jammy builder was causing
failsWhenBuildImageIsInvokedOnMultiModuleProjectWithBuildImageGoal to
hang on CI.

See gh-36689
  • Loading branch information
wilkinsona committed Aug 7, 2023
1 parent 9d42cff commit b1d26fe
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 13 deletions.
3 changes: 2 additions & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void configureBootBuildImageToProduceANativeImage(Project project) {
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");
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ void bootBuildImageIsConfiguredToBuildANativeImage() {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ void whenUsingDefaultConfigurationThenRequestHasPublishDisabled() {

@Test
void whenNoBuilderIsConfiguredThenRequestHasDefaultBuilder() {
assertThat(this.buildImage.createRequest().getBuilder().getName())
.isEqualTo("paketobuildpacks/builder-jammy-base");
assertThat(this.buildImage.createRequest().getBuilder().getName()).isEqualTo("paketobuildpacks/builder");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void getBuildRequestWhenNameIsSetUsesName() {
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();
Expand Down

0 comments on commit b1d26fe

Please sign in to comment.