Merge branch 'stable-3.1'

* stable-3.1:
  Use Gerrit version and config SHA1 to identify image tag
  Gerrit dual-master in HA recipe
  Allow customising cluster keys

Change-Id: I41b57fdb8070c567381a98255a673c8b0d0abe5f
diff --git a/gerrit/Dockerfile b/gerrit/Dockerfile
index 7618551..aa03945 100644
--- a/gerrit/Dockerfile
+++ b/gerrit/Dockerfile
@@ -1,9 +1,8 @@
-FROM gerritcodereview/gerrit:$GERRIT_VERSION.$GERRIT_PATCH-centos7
+FROM gerritcodereview/gerrit:$GERRIT_VERSION.$GERRIT_PATCH-centos8
 
 USER root
 
-RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
-    && yum install -y python36u python36u-libs python36u-devel python36u-pip
+RUN  yum install -y python36 python3-libs python36-devel python3-pip
 
 COPY --chown=gerrit:gerrit ssh-config /var/gerrit/.ssh/config
 
diff --git a/gerrit/Makefile b/gerrit/Makefile
index f240c55..7430ef5 100644
--- a/gerrit/Makefile
+++ b/gerrit/Makefile
@@ -14,7 +14,7 @@
 	|| { echo >&2 "Cannot download metrics-reporter-prometheus plugin: Check internet connection. Aborting"; exit 1; }
 
 	@echo "Downloading javamelody plugin $(GERRIT_BRANCH)"
-	wget $(GERRIT_CI)/plugin-javamelody-bazel-$(GERRIT_BRANCH)/$(LAST_BUILD)/javamelody/javamelody.jar \
+	wget $(GERRIT_CI)/plugin-javamelody-bazel-master-$(GERRIT_BRANCH)/$(LAST_BUILD)/javamelody/javamelody.jar \
 	-O ./plugins/javamelody.jar \
 	|| { echo >&2 "Cannot download javamelody plugin: Check internet connection. Aborting"; exit 1; }
 
diff --git a/version.env b/version.env
index 4d44ba2..975b4dc 100644
--- a/version.env
+++ b/version.env
@@ -1,7 +1,7 @@
-GERRIT_VERSION=3.1
-GERRIT_PATCH=4
+GERRIT_VERSION=3.2
+GERRIT_PATCH=0-rc3
 GERRIT_BRANCH=stable-$(GERRIT_VERSION)
 GERRIT_CI=https://gerrit-ci.gerritforge.com/view/Plugins-$(GERRIT_BRANCH)/job
 LAST_BUILD=lastSuccessfulBuild/artifact/bazel-bin/plugins
 HEAD_SHA1=$(shell git log -1 --format=format:%h)
-IMAGE_TAG=$(GERRIT_VERSION).$(GERRIT_PATCH)-$(HEAD_SHA1)
\ No newline at end of file
+IMAGE_TAG=$(GERRIT_VERSION).$(GERRIT_PATCH)-$(HEAD_SHA1)