Dockerfile.gerrit: Upgrade to Gerrit 3.7.6 and use LFS plugin
We're currently using 3.7.6 in production.
Install the lfs plugin too. A future commit will establish configuration for it.
Manual steps are required for upgrading Gerrit:
- Delete the
javaHome
setting from the[container]
section ingerrit.config
in the exp_train-dev-gerrit-etc Docker volume (/etc/gerrit/gerrit.config
from inside to gerrit service container). This is most easily done before performing the rebuild, while the old Gerrit container is still running:
./train-dev docker-compose exec gerrit bash
bash-4.4$ vi /etc/gerrit/gerrit.config
- Start the rebuild:
./train-dev build <workspace-dir>
The operation will eventually fail like so:
waiting for gerrit to come online...
Error: No such container:
- Add the following to the gerrit service in
exp/docker-compose.yml
:
restart: "no"
entrypoint: [bash, -c, "java -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit && java -jar /var/gerrit/bin/gerrit.war reindex -d /var/gerrit --index changes"]
- Restart the gerrit service to make it run the upgrade commands from the prior step:
./train-dev docker-compose up gerrit
This will show the progress of the upgrade and will eventually terminate.
-
Remove the two lines added to
exp/docker-compose.yml
-
Restart the build, which should run to completion:
./train-dev build <workspace-dir>