knative / build-templates

A library of build templates.
Apache License 2.0
184 stars 68 forks source link

Jib build template - differentiate Java 8 vs Java 11 #95

Open saturnism opened 5 years ago

saturnism commented 5 years ago

Some Java 8 applications can't be built/run w/ OpenJDK 11. Jib build template uses the maven base image: gcr.io/cloud-builders/mvn which isn't pinned to a JDK version. As a result, the latest version of this image jumped from OpenJDK 8 to OpenJDK 11, resulting in build failures.

We should let user choose the base JDK version, potentially through: a. different build template name (e.g., jib-maven-jdk-8) and using a pinned maven base image b. have both OpenJDK 8 and 11 in the same base image, and let user configure via an environmental variable to specify which OpenJDK version to use.

/cc @mchmarny @coollog