Skip to content

Commit

Permalink
Upgrade default CNB builders to Paketo Jammy
Browse files Browse the repository at this point in the history
Closes gh-38477
  • Loading branch information
scottfrederick committed Nov 21, 2023
1 parent 95fbb49 commit d1cce0f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ resources:
type: registry-image
icon: docker
source:
repository: paketobuildpacks/builder
tag: base
repository: paketobuildpacks/builder-jammy-base
tag: latest
- name: artifactory-repo
type: artifactory-resource
icon: package-variant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
public class BuildRequest {

static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder:base";
static final String DEFAULT_BUILDER_IMAGE_NAME = "paketobuildpacks/builder-jammy-base:latest";

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 @@ -105,7 +105,7 @@ The following table summarizes the available properties and their default values
| `builder`
| `--builder`
| Name of the Builder image to use.
| `paketobuildpacks/builder:base`
| `paketobuildpacks/builder-jammy-base:latest`

| `runImage`
| `--runImage`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ void whenUsingDefaultConfigurationThenRequestHasPublishDisabled() {

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

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,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:base`
| `paketobuildpacks/builder-jammy-base:latest`

| `runImage` +
(`spring-boot.build-image.runImage`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ class ImageTests {
@Test
void getBuildRequestWhenNameIsNullDeducesName() {
BuildRequest request = new Image().getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName().toString()).isEqualTo("docker.io/library/my-app:0.0.1-SNAPSHOT");
assertThat(request.getName()).hasToString("docker.io/library/my-app:0.0.1-SNAPSHOT");
}

@Test
void getBuildRequestWhenNameIsSetUsesName() {
Image image = new Image();
image.name = "demo";
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getName().toString()).isEqualTo("docker.io/library/demo:latest");
assertThat(request.getName()).hasToString("docker.io/library/demo:latest");
}

@Test
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("paketobuildpacks/builder");
assertThat(request.getName()).hasToString("docker.io/library/my-app:0.0.1-SNAPSHOT");
assertThat(request.getBuilder().toString()).contains("paketobuildpacks/builder-jammy-base");
assertThat(request.getRunImage()).isNull();
assertThat(request.getEnv()).isEmpty();
assertThat(request.isCleanCache()).isFalse();
Expand All @@ -83,15 +83,15 @@ void getBuildRequestWhenHasBuilderUsesBuilder() {
Image image = new Image();
image.builder = "springboot/builder:2.2.x";
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getBuilder().toString()).isEqualTo("docker.io/springboot/builder:2.2.x");
assertThat(request.getBuilder()).hasToString("docker.io/springboot/builder:2.2.x");
}

@Test
void getBuildRequestWhenHasRunImageUsesRunImage() {
Image image = new Image();
image.runImage = "springboot/run:latest";
BuildRequest request = image.getBuildRequest(createArtifact(), mockApplicationContent());
assertThat(request.getRunImage().toString()).isEqualTo("docker.io/springboot/run:latest");
assertThat(request.getRunImage()).hasToString("docker.io/springboot/run:latest");
}

@Test
Expand Down

0 comments on commit d1cce0f

Please sign in to comment.