Update Gerrit to 3.3.0
This change updates Gerrit to the current release 3.3.0.
Since Gerrit 3.3.0 is using Java 11, Java is updated as
well.
Change-Id: I88e20a63145e8ddc9771bfc2058db12da79bfbea
diff --git a/container-images/gerrit-base/Dockerfile b/container-images/gerrit-base/Dockerfile
index de4c378..fb1d413 100644
--- a/container-images/gerrit-base/Dockerfile
+++ b/container-images/gerrit-base/Dockerfile
@@ -4,7 +4,7 @@
apk add --no-cache \
curl \
openssh-keygen \
- openjdk8
+ openjdk11
RUN mkdir -p /var/gerrit/bin && \
mkdir -p /var/gerrit/etc && \
@@ -13,13 +13,13 @@
mkdir -p /var/war
# Download Gerrit release
-ARG GERRIT_WAR_URL=https://gerrit-releases.storage.googleapis.com/gerrit-3.1.7.war
+ARG GERRIT_WAR_URL=https://gerrit-releases.storage.googleapis.com/gerrit-3.3.0.war
RUN curl -k -o /var/war/gerrit.war ${GERRIT_WAR_URL} && \
ln -s /var/war/gerrit.war /var/gerrit/bin/gerrit.war
# Download healthcheck plugin
RUN curl -k -o /var/plugins/healthcheck.jar \
- https://gerrit-ci.gerritforge.com/job/plugin-healthcheck-bazel-stable-3.1/lastSuccessfulBuild/artifact/bazel-bin/plugins/healthcheck/healthcheck.jar && \
+ https://gerrit-ci.gerritforge.com/job/plugin-healthcheck-bazel-stable-3.3/lastSuccessfulBuild/artifact/bazel-bin/plugins/healthcheck/healthcheck.jar && \
ln -s /var/plugins/healthcheck.jar /var/gerrit/plugins/healthcheck.jar
# Allow incoming traffic
diff --git a/helm-charts/gerrit-replica/Chart.yaml b/helm-charts/gerrit-replica/Chart.yaml
index 291ada9..c995e1a 100644
--- a/helm-charts/gerrit-replica/Chart.yaml
+++ b/helm-charts/gerrit-replica/Chart.yaml
@@ -1,5 +1,5 @@
apiVersion: v2
-appVersion: 3.1.7
+appVersion: 3.3.0
description: |-
The Gerrit replica serves as a read-only Gerrit instance to serve repositories
that it receives from a Gerrit instance via replication. It can be used to
diff --git a/helm-charts/gerrit-replica/values.yaml b/helm-charts/gerrit-replica/values.yaml
index 952d645..31234e8 100644
--- a/helm-charts/gerrit-replica/values.yaml
+++ b/helm-charts/gerrit-replica/values.yaml
@@ -345,7 +345,7 @@
[container]
user = gerrit # FIXED
replica = true # FIXED
- javaHome = /usr/lib/jvm/java-1.8-openjdk # FIXED
+ javaHome = /usr/lib/jvm/java-11-openjdk # FIXED
javaOptions = -Djavax.net.ssl.trustStore=/var/gerrit/etc/keystore # FIXED
javaOptions = -Xms200m
# Has to be lower than 'gerritReplica.resources.limits.memory'. Also
diff --git a/helm-charts/gerrit/Chart.yaml b/helm-charts/gerrit/Chart.yaml
index 71e1329..b2077dd 100644
--- a/helm-charts/gerrit/Chart.yaml
+++ b/helm-charts/gerrit/Chart.yaml
@@ -1,5 +1,5 @@
apiVersion: v2
-appVersion: 3.1.7
+appVersion: 3.3.0
description: |-
Gerrit is a free, web-based team code collaboration tool. Software developers
in a team can review each other's modifications on their source code using
diff --git a/helm-charts/gerrit/values.yaml b/helm-charts/gerrit/values.yaml
index 76dec47..496daa7 100644
--- a/helm-charts/gerrit/values.yaml
+++ b/helm-charts/gerrit/values.yaml
@@ -216,7 +216,7 @@
directory = cache
[container]
user = gerrit # FIXED
- javaHome = /usr/lib/jvm/java-1.8-openjdk # FIXED
+ javaHome = /usr/lib/jvm/java-11-openjdk # FIXED
javaOptions = -Djavax.net.ssl.trustStore=/var/gerrit/etc/keystore # FIXED
javaOptions = -Xms200m
# Has to be lower than 'gerrit.resources.limits.memory'. Also
diff --git a/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py b/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py
index 52a2f35..b19f197 100755
--- a/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py
+++ b/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py
@@ -19,6 +19,9 @@
import utils
+JAVA_VER = 11
+
+
@pytest.fixture(scope="module")
def container_run(docker_client, container_endless_run_factory, gerrit_base_image):
container_run = container_endless_run_factory(docker_client, gerrit_base_image)
@@ -37,7 +40,7 @@
def test_gerrit_base_contains_java8(container_run):
_, output = container_run.exec_run("java -version")
output = output.strip().decode("utf-8")
- assert re.search(re.compile('openjdk version "1.8.[0-9]_[0-9]+"'), output)
+ assert re.search(re.compile(f'openjdk version "{JAVA_VER}.[0-9]+.[0-9]+"'), output)
@pytest.mark.docker
@@ -48,7 +51,7 @@
)
output = output.strip().decode("utf-8")
assert exit_code == 0
- assert output == "/usr/lib/jvm/java-1.8-openjdk/jre/bin/java"
+ assert output == f"/usr/lib/jvm/java-{JAVA_VER}-openjdk/bin/java"
@pytest.mark.docker
diff --git a/tests/helm-charts/gerrit/test_chart_gerrit_plugins.py b/tests/helm-charts/gerrit/test_chart_gerrit_plugins.py
index a70d547..1b27040 100644
--- a/tests/helm-charts/gerrit/test_chart_gerrit_plugins.py
+++ b/tests/helm-charts/gerrit/test_chart_gerrit_plugins.py
@@ -25,8 +25,8 @@
import utils
-PLUGINS = ["uploadvalidator", "serviceuser"]
-GERRIT_VERSION = "3.1"
+PLUGINS = ["uploadvalidator", "account"]
+GERRIT_VERSION = "3.3"
@pytest.fixture(scope="module")