diff --git a/_faqs/how-to-specify-backend-java-ci.md b/_faqs/how-to-specify-backend-java-ci.md index b0e59e7f..a5f76a41 100644 --- a/_faqs/how-to-specify-backend-java-ci.md +++ b/_faqs/how-to-specify-backend-java-ci.md @@ -13,7 +13,7 @@ For the few front-end modules that still use Jenkins build rather than GitHub Wo ## Using Java 17 -For projects that use Java 17: +For projects that use Java 17 (as at 2024-10-10 this is the default): * In [Jenkinsfile](/guides/jenkinsfile/), declare this in the "buildMvn" section:\ `buildNode = 'jenkins-agent-java17'` @@ -22,24 +22,25 @@ For projects that use Java 17: `FROM folioci/alpine-jre-openjdk17:latest` * See other notes (e.g. POM file, and dependencies, and wget example) at Wiki [JDK 17 and Java 17](https://folio-org.atlassian.net/wiki/x/Th9N). -## Using Java 11 +## Using Java 21 -For some projects that use Java 11 (there should now not be any): +For projects that use Java 21: * In [Jenkinsfile](/guides/jenkinsfile/), declare this in the "buildMvn" section:\ - `buildNode = 'jenkins-agent-java11'` + `buildNode = 'jenkins-agent-java21'` +* In [Jenkinsfile](/guides/jenkinsfile/), declare the mandatory module heath check endpoint via the Docker command `healthChkCmd` to use 'wget'. (There is no 'curl' available on the base image.) * In Dockerfile, use:\ - `FROM folioci/alpine-jre-openjdk11:latest` -* Additional [upgrade notes](https://github.com/folio-org/raml-module-builder/blob/master/doc/upgrading.md#version-310) for projects based on RAML Module Builder (RMB). + `FROM folioci/alpine-jre-openjdk21:latest` +* See other notes (e.g. POM file, and dependencies, and wget example) at Wiki [JDK 17 and Java 17](https://folio-org.atlassian.net/wiki/x/Th9N). ## Not using buildMvn pipeline -As some Java-based projects do not use the "buildMvn" pipeline, they can specify the agent node in their Jenkinsfile (either `'jenkins-agent-java17'` or `'jenkins-agent-java11'`) e.g.: +As some Java-based projects do not use the "buildMvn" pipeline, they can specify the agent node in their Jenkinsfile (either `'jenkins-agent-java17'` or `'jenkins-agent-java21'`) e.g.: ``` agent { node { - label 'jenkins-agent-java11' + label 'jenkins-agent-java17' } } ``` @@ -48,7 +49,7 @@ agent { For the few front-end projects that still use Jenkins build rather than GitHub Workflows, the buildNode provides the relevant Nodejs version: -For projects that now use Nodejs 16: +For projects that use Nodejs 18: * In [Jenkinsfile](/guides/jenkinsfile/), declare this in the "buildNPM" section:\ `buildNode = 'jenkins-agent-java17'` @@ -58,6 +59,16 @@ For projects that still use Nodejs 14: * In [Jenkinsfile](/guides/jenkinsfile/), declare this in the "buildNPM" section:\ `buildNode = 'jenkins-agent-java11'` +## Using deprecated Java 11 + +For some projects that use Java 11 (there should now not be any): + +* In [Jenkinsfile](/guides/jenkinsfile/), declare this in the "buildMvn" section:\ + `buildNode = 'jenkins-agent-java11'` +* In Dockerfile, use:\ + `FROM folioci/alpine-jre-openjdk11:latest` +* Additional [upgrade notes](https://github.com/folio-org/raml-module-builder/blob/master/doc/upgrading.md#version-310) for projects based on RAML Module Builder (RMB). + ## Using deprecated Java 8 **Note:** FOLIO modules can no longer use the deprecated Java 8 facilities ([FOLIO-2926](https://issues.folio.org/browse/FOLIO-2926)). diff --git a/guides/jenkinsfile.md b/guides/jenkinsfile.md index f1fe5fd6..59fc351b 100644 --- a/guides/jenkinsfile.md +++ b/guides/jenkinsfile.md @@ -46,8 +46,9 @@ buildMvn { ``` * `buildNode` -- The Jenkins node to run the CI build. -The default is `'jenkins-agent-java11'` if not specified. -The other available option is `'jenkins-agent-java17'`. +The default is `'jenkins-agent-java17'` if not specified. +The other available option is `'jenkins-agent-java21'`. +See FAQ [How to specify which Jenkins build image for CI](/faqs/how-to-specify-backend-java-ci/). * `publishModDescriptor` -- Maven-based modules will generate the ModuleDescriptor.json file as [explained](/guides/commence-a-module/#back-end-descriptors). It will be published to the FOLIO Module Descriptor registry. diff --git a/guides/module-descriptor.md b/guides/module-descriptor.md index 7d6d598a..46b58d96 100644 --- a/guides/module-descriptor.md +++ b/guides/module-descriptor.md @@ -177,7 +177,7 @@ This environment variable must at least have the setting as shown in the [exampl The module's Dockerfile needs to use a base image that has the feature "UseContainerSupport". Use that feature in conjunction with "MaxRAMPercentage". -Note that all Java-based modules should now be [using Java 17](/faqs/how-to-specify-backend-java-ci/). +Note that all Java-based modules should now be [using Java 21 or Java 17](/faqs/how-to-specify-backend-java-ci/). Other necessary options can be appended (e.g. -XX:+PrintFlagsFinal).