system-config/playbooks/zuul/gerrit/repos.yaml
Clark Boylan aadce43971 Add gerrit 3.9 image builds
We need to add java-prettify to our submodule setup as this is a new
gerrit submodule. While we're in there we also cleanup some python
binary symlinks that were only necessary for Gerrit 3.5 and older.

The Gerrit 3.9.0 release was a bad release because it accidentally
updated lucene versions to far ahead of 3.8.x. This broke online
reindexing post upgrade from 3.8.x to 3.9.0. To address this the Gerrit
project pulled 3.9.0, reverted a bunch of stuff, made a 3.9.0-rc6, we
tested this (as did others), and when everything was working as expected
released 3.9.1 to replace 3.9.0. That is the reason we are starting our
image builds with 3.9.1 and not 3.9.0.

It should be noted that 3.9.0 should be entirely avoided as well.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/901479
Change-Id: Ice2201ce5a7b3f560923dce84af2603bdc709ab9
2023-12-01 13:59:50 -08:00

64 lines
1.9 KiB
YAML

- hosts: all
roles:
- role: ensure-java
java_version: 17
- role: ensure-nodejs
node_version: 18
- ensure-bazelisk
tasks:
- name: Install essential build packages
become: true
package:
name:
- build-essential
- zip
- unzip
state: present
- name: Move common plugin repos into gerrit tree
command: "mv -f {{ item }} ../gerrit/plugins"
args:
chdir: /home/zuul/src/gerrit.googlesource.com/plugins
loop:
- codemirror-editor
- commit-message-length-validator
- delete-project
- download-commands
- gitiles
- hooks
- its-base
- its-storyboard
- plugin-manager
- replication
- reviewnotes
- singleusergroup
- webhooks
- zuul-results-summary
# Some submodules don't have appropriate refs to checkout for specific
# gerrit branches. We address that by checking them out explicitly in
# submodules.yaml on branches that need it.
# The default zuul remote, file:///dev/null, doesn't work
# here because relative paths cause it to be
# file:///dev/plugins/download-commands, which isn't a thing. Removing
# the origin causes git to use relative local filesystem paths.
- name: Remove origin remote
command: "git remote rm origin"
args:
chdir: /home/zuul/src/gerrit.googlesource.com/gerrit
- name: Move additional plugin repos into gerrit tree
command: "mv -f {{ item }} ../gerrit/plugins"
args:
chdir: /home/zuul/src/gerrit.googlesource.com/plugins
loop: "{{ gerrit_additional_plugins | default([]) }}"
- name: Configure plugin bazel file
lineinfile:
path: /home/zuul/src/gerrit.googlesource.com/gerrit/tools/bzl/plugins.bzl
insertafter: "# Add custom core plugins here"
line: '"{{ item }}",'
loop:
- its-storyboard
- its-base