Skip to content

Commit

Permalink
Merge pull request #1755 from folio-org/FOLIO-4054-java-21
Browse files Browse the repository at this point in the history
FOLIO-4054 Update docs new buildNode jenkins-agent-java21
  • Loading branch information
dcrossleyau authored Oct 10, 2024
2 parents 9a3b54b + 5bd0cc3 commit 1c5c191
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
29 changes: 20 additions & 9 deletions _faqs/how-to-specify-backend-java-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'`
Expand All @@ -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'
}
}
```
Expand All @@ -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'`
Expand All @@ -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)).
Expand Down
5 changes: 3 additions & 2 deletions guides/jenkinsfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion guides/module-descriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ This environment variable must at least have the setting as shown in the [exampl

<a id="dockerfile"></a>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).

Expand Down

0 comments on commit 1c5c191

Please sign in to comment.