Clark Boylan 1008a1fc90 Build images for gerrit 3.1 and 3.2
This will allow us to test further gerrit upgrades while we sort out how
far into the gerrit releases we will be upgrading to on our next
upgrade.

Change-Id: Ic9d07b76e41ad4262cc0e2e1ff8a5d554f88239e
2020-10-06 15:37:06 -07:00

71 lines
2.3 KiB
YAML

- hosts: all
roles:
- ensure-java
- role: ensure-nodejs
node_version: 10
- ensure-bazelisk
tasks:
- name: Install essential build packages
become: true
package:
name:
- build-essential
- zip
- unzip
state: present
- name: Move plugin repos into gerrit tree
command: "mv -f {{ item }} ../gerrit/plugins"
args:
chdir: /home/zuul/src/gerrit.googlesource.com/plugins
loop:
- commit-message-length-validator
- hooks
- its-storyboard
- its-base
- javamelody
- replication
- reviewnotes
- download-commands
- singleusergroup
# 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
- javamelody
- name: Configure javamelody external plugin deps
file:
state: link
force: yes
src: javamelody/external_plugin_deps.bzl
path: /home/zuul/src/gerrit.googlesource.com/gerrit/plugins/external_plugin_deps.bzl
- name: Move build script into main gerrit source dir
command: "mv docker/gerrit/bazel/build-gerrit.sh /home/zuul/src/gerrit.googlesource.com/gerrit"
args:
chdir: /home/zuul/src/opendev.org/opendev/system-config