module/gerrit: set explicitly serverId
gerrit.serverId is automatically set to a random UUID if not explicitly
set. This will prevent to handle changes and repositories across
different instances. For instance when Docker is restarted.
diff --git a/module/gerrit/holder.sh b/module/gerrit/holder.sh
index 463d044..44eed80 100644
--- a/module/gerrit/holder.sh
+++ b/module/gerrit/holder.sh
@@ -32,6 +32,10 @@
_GERRIT_DKRC_CONTEXT_="${mod_docker_d}"
_GERRIT_DKRC_ROOTFS_="${mod_rootfs_d}"
_GERRIT_DKRC_ETC_D_="${etc_d}"
+# WARNING: changing serverId will prevent Gerrit to access all changes
+# created with the old serverId. This should be carried over to retain
+# support of all gerrit user created data across multiple containers.
+_GERRIT_SERVER_ID_="8643d3a7-ba34-448c-95b3-d0201b48593b"
_GERRIT_LOGS_D_="$logs_d"
_GERRIT_DKRC_HOOKS_D_="${hooks_d}"
_GERRIT_HOOKS_CON_D_="/var/gerrit/hooks"
diff --git a/module/gerrit/scheme.sh b/module/gerrit/scheme.sh
index 7d3debe..7e0a4be 100644
--- a/module/gerrit/scheme.sh
+++ b/module/gerrit/scheme.sh
@@ -69,6 +69,7 @@
[gerrit]
basePath = git
canonicalWebUrl = ${_GERRIT_CANON_URL_}
+ serverId = ${_GERRIT_SERVER_ID_}
${config_t_has_secure_store}
[index]