Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Eclipse Temurin for Java 17 #3552

Merged
merged 3 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jib-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ All notable changes to this project will be documented in this file.
### Changed

- Downgraded Google HTTP libraries to 1.34.0 to resolve network issues. ([#3415](https://github.com/GoogleContainerTools/jib/pull/3415), [#3058](https://github.com/GoogleContainerTools/jib/issues/3058), [#3409](https://github.com/GoogleContainerTools/jib/issues/3409))
- Changed the default base image of the Jib CLI `jar` command from the `adoptopenjdk` images to the [`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin) (for Java 8 and 11) and [`azul/zulu-openjdk`](https://hub.docker.com/r/azul/zulu-openjdk) (for Java 17) images on Docker Hub. Note that Temurin (by Adoptium) is the new name of AdoptOpenJDK. ([#3491](https://github.com/GoogleContainerTools/jib/pull/3491))
- Changed the default base image of the Jib CLI `jar` command from the `adoptopenjdk` images to the [`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin) on Docker Hub. Note that Temurin (by Adoptium) is the new name of AdoptOpenJDK. ([#3483](https://github.com/GoogleContainerTools/jib/issues/3483))

## 0.7.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ private static String getDefaultBaseImage(ArtifactProcessor processor) {
if (processor.getJavaVersion() <= 11) {
return "eclipse-temurin:11-jre";
}
return "azul/zulu-openjdk:17-jre";
return "eclipse-temurin:17-jre";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public class JarFilesTest {
"8, eclipse-temurin:8-jre",
"9, eclipse-temurin:11-jre",
"11, eclipse-temurin:11-jre",
"13, azul/zulu-openjdk:17-jre",
"17, azul/zulu-openjdk:17-jre",
"13, eclipse-temurin:17-jre",
"17, eclipse-temurin:17-jre",
})
public void testToJibContainer_defaultBaseImage(int javaVersion, String expectedBaseImage)
throws IOException, InvalidImageReferenceException {
Expand Down
2 changes: 1 addition & 1 deletion jib-gradle-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file.

### Changed

- Changed the default base image from the `adoptopenjdk` images to the [`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin) (for Java 8 and 11) and [`azul/zulu-openjdk`](https://hub.docker.com/r/azul/zulu-openjdk) (for Java 17) images on Docker Hub. Note that Temurin (by Adoptium) is the new name of AdoptOpenJDK. ([#3491](https://github.com/GoogleContainerTools/jib/pull/3491))
- Changed the default base image of the Jib CLI `jar` command from the `adoptopenjdk` images to the [`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin) on Docker Hub. Note that Temurin (by Adoptium) is the new name of AdoptOpenJDK. ([#3483](https://github.com/GoogleContainerTools/jib/issues/3483))

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion jib-maven-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file.

### Changed

- Changed the default base image from the `adoptopenjdk` images to the [`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin) (for Java 8 and 11) and [`azul/zulu-openjdk`](https://hub.docker.com/r/azul/zulu-openjdk) (for Java 17) images on Docker Hub. Note that Temurin (by Adoptium) is the new name of AdoptOpenJDK. ([#3491](https://github.com/GoogleContainerTools/jib/pull/3491))
- Changed the default base image of the Jib CLI `jar` command from the `adoptopenjdk` images to the [`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin) on Docker Hub. Note that Temurin (by Adoptium) is the new name of AdoptOpenJDK. ([#3483](https://github.com/GoogleContainerTools/jib/issues/3483))

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,7 @@ static void writeFileConservatively(Path file, String content) throws IOExceptio

/**
* Gets the suitable value for the base image. If the raw base image parameter is null, returns
* {@code "jetty"} for WAR projects, or {@code "eclipse-temurin:{8|11}-jre"} or {@code
* "azul/zulu-openjdk:17-jre"} for non-WAR.
* {@code "jetty"} for WAR projects, or {@code "eclipse-temurin:{8|11|17}-jre"} for non-WAR.
*
* @param projectProperties used for providing additional information
* @return the base image
Expand All @@ -759,7 +758,7 @@ static String getDefaultBaseImage(ProjectProperties projectProperties)
} else if (javaVersion <= 11) {
return "eclipse-temurin:11-jre";
} else if (javaVersion <= 17) {
return "azul/zulu-openjdk:17-jre";
return "eclipse-temurin:17-jre";
}
throw new IncompatibleBaseImageJavaVersionException(17, javaVersion);
}
Expand Down Expand Up @@ -1081,6 +1080,6 @@ private static boolean isKnownJava11Image(String imageReference) {
* @return {@code true} if the image is a known Java 17 image
*/
private static boolean isKnownJava17Image(String imageReference) {
return imageReference.startsWith("azul/zulu-openjdk:17");
return imageReference.startsWith("eclipse-temurin:17");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,8 @@ public void testGetDefaultBaseImage_warProject()
"8, eclipse-temurin:8-jre",
"9, eclipse-temurin:11-jre",
"11, eclipse-temurin:11-jre",
"13, azul/zulu-openjdk:17-jre",
"17, azul/zulu-openjdk:17-jre"
"13, eclipse-temurin:17-jre",
"17, eclipse-temurin:17-jre"
})
public void testGetDefaultBaseImage_defaultJavaBaseImage(
int javaVersion, String expectedBaseImage) throws IncompatibleBaseImageJavaVersionException {
Expand Down Expand Up @@ -946,7 +946,8 @@ public void testGetJavaContainerBuilderWithBaseImage_registryWithPrefix()
"adoptopenjdk:11-jre, 11, 15",
"eclipse-temurin:11, 11, 15",
"eclipse-temurin:11-jre, 11, 15",
"azul/zulu-openjdk:17-jr, 17, 19"
"eclipse-temurin:17, 17, 19",
"eclipse-temurin:17-jre, 17, 19"
})
public void testGetJavaContainerBuilderWithBaseImage_incompatibleJavaBaseImage(
String baseImage, int baseImageJavaVersion, int appJavaVersion) {
Expand Down