Merge "Update gerrit image to bookworm"

This commit is contained in:
Zuul 2023-10-09 16:19:47 +00:00 committed by Gerrit Code Review
commit cac37a7a3c
5 changed files with 16 additions and 12 deletions

View File

@ -15,17 +15,17 @@
# Sun Jul 16 22:42:10 UTC 2023 - trigger rebuild # Sun Jul 16 22:42:10 UTC 2023 - trigger rebuild
FROM docker.io/opendevorg/python-builder:3.9-bullseye as builder FROM docker.io/opendevorg/python-builder:3.11-bookworm as builder
COPY . /tmp/src COPY . /tmp/src
RUN assemble RUN assemble
FROM docker.io/opendevorg/python-base:3.9-bullseye as gerrit-base FROM docker.io/opendevorg/python-base:3.11-bookworm as gerrit-base
RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/95disable-recommends RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/95disable-recommends
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y dumb-init git openssh-client openjdk-11-jdk-headless unzip \ && apt-get install -y dumb-init git openssh-client openjdk-17-jdk-headless unzip \
# This next set of installs helps align us with the old openjdk image \ # This next set of installs helps align us with the old openjdk image \
# but they may not all be necessary \ # but they may not all be necessary \
&& apt-get install -y xz-utils bzip2 wget curl gnupg \ && apt-get install -y xz-utils bzip2 wget curl gnupg \

View File

@ -35,7 +35,11 @@
{% if gerrit_heap_limit is defined %} {% if gerrit_heap_limit is defined %}
heapLimit = {{ gerrit_heap_limit }} heapLimit = {{ gerrit_heap_limit }}
{% endif %} {% endif %}
javaHome = /usr/lib/jvm/java-11-openjdk-amd64 # TODO(clarkb) javaHome and possibly javaOptions may be candidates
# for cleanup. The upstream gerrit.sh init script fetches these
# values to configure Gerrit startup, but we we a very simple
# startup script in our containers now.
javaHome = /usr/lib/jvm/java-17-openjdk-amd64
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance" javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance" javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
[gc] [gc]

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
# The /dev/./urandom is not a typo. https://stackoverflow.com/questions/58991966/what-java-security-egd-option-is-for # The /dev/./urandom is not a typo. https://stackoverflow.com/questions/58991966/what-java-security-egd-option-is-for
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.security.egd=file:/dev/./urandom ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Djava.security.egd=file:/dev/./urandom ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit

View File

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

View File

@ -7,8 +7,8 @@
- opendev/jeepyb - opendev/jeepyb
- opendev/system-config - opendev/system-config
requires: requires:
- python-builder-3.9-bullseye-container-image - python-builder-3.11-bookworm-container-image
- python-base-3.9-bullseye-container-image - python-base-3.11-bookworm-container-image
provides: gerrit-base-container-image provides: gerrit-base-container-image
pre-run: &gerrit-base_prerun pre-run: &gerrit-base_prerun
- playbooks/zuul/gerrit/base.yaml - playbooks/zuul/gerrit/base.yaml
@ -27,8 +27,8 @@
description: Build and upload a gerrit-base image. description: Build and upload a gerrit-base image.
parent: system-config-upload-image parent: system-config-upload-image
requires: requires:
- python-builder-3.9-bullseye-container-image - python-builder-3.11-bookworm-container-image
- python-base-3.9-bullseye-container-image - python-base-3.11-bookworm-container-image
provides: gerrit-base-container-image provides: gerrit-base-container-image
pre-run: *gerrit-base_prerun pre-run: *gerrit-base_prerun
required-projects: *gerrit_base_projects required-projects: *gerrit_base_projects
@ -316,7 +316,7 @@
- system-config-build-image-gerrit-base: - system-config-build-image-gerrit-base:
dependencies: dependencies:
- name: opendev-buildset-registry - name: opendev-buildset-registry
- name: system-config-build-image-python-builder-3.9-bullseye - name: system-config-build-image-python-builder-3.11-bookworm
soft: true soft: true
- system-config-build-image-gerrit-3.7: - system-config-build-image-gerrit-3.7:
dependencies: dependencies:
@ -339,7 +339,7 @@
- system-config-upload-image-gerrit-base: - system-config-upload-image-gerrit-base:
dependencies: dependencies:
- name: opendev-buildset-registry - name: opendev-buildset-registry
- name: system-config-upload-image-python-builder-3.9-bullseye - name: system-config-upload-image-python-builder-3.11-bookworm
soft: true soft: true
- system-config-upload-image-gerrit-3.7: - system-config-upload-image-gerrit-3.7:
dependencies: dependencies: