Update gerrit docker image to java 11

Gerrit 3.2 supports java 11 now and Gerrit 3.3 will be the last to
support java 8. Lets get ahead of things and switch to java 11.

Change-Id: I1b2f6b1bdadad10917ef5c56ce77f7d7cfc8625d
This commit is contained in:
Clark Boylan 2020-11-22 07:56:34 -08:00 committed by Jeremy Stanley
parent 1426c8e283
commit 70ef807b3e
3 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@ FROM docker.io/opendevorg/python-builder:3.7 as builder
COPY . /tmp/src
RUN assemble
FROM docker.io/library/openjdk:8 as gerrit-base
FROM docker.io/library/openjdk:11 as gerrit-base
RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/95disable-recommends
@ -69,4 +69,4 @@ ENV JAVA_OPTIONS ""
# Ulimits should be set on command line or in docker-compose.yaml
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# The /dev/./urandom is not a typo. https://stackoverflow.com/questions/58991966/what-java-security-egd-option-is-for
CMD /usr/local/openjdk-8/bin/java -Djava.security.egd=file:/dev/./urandom ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit
CMD /usr/local/openjdk-11/bin/java -Djava.security.egd=file:/dev/./urandom ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit

View File

@ -27,7 +27,7 @@
{% if gerrit_heap_limit is defined %}
heapLimit = {{ gerrit_heap_limit }}
{% endif %}
javaHome = /usr/local/openjdk-8/jre
javaHome = /usr/local/openjdk-11/jre
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
[gc]

View File

@ -1,6 +1,7 @@
- hosts: all
roles:
- ensure-java
- role: ensure-java
java_version: 11
- role: ensure-nodejs
node_version: 10
- ensure-bazelisk