c78e410373
It seems there's no jammy repositories for nodejs 10.x. Upstream reccommends "at least" LTS v16 -- the current LTS is 18 so let's try that. Also update the git config to allow the submodule clones per the recent CVE's. [1] https://gerrit.googlesource.com/gerrit/+/master/polygerrit-ui/README.md#installing-node_js-and-npm-packages Change-Id: I1492e4c136c18155eb3cb7fed24b413b250c78b5
74 lines
2.3 KiB
YAML
74 lines
2.3 KiB
YAML
- hosts: all
|
|
roles:
|
|
- role: ensure-java
|
|
java_version: 11
|
|
- role: ensure-nodejs
|
|
node_version: 18
|
|
- ensure-bazelisk
|
|
tasks:
|
|
- name: Install essential build packages
|
|
become: true
|
|
package:
|
|
name:
|
|
- build-essential
|
|
- zip
|
|
- unzip
|
|
state: present
|
|
|
|
# Until Gerrit 3.5 we need to work around scripts looking for bare
|
|
# python instead of python3.
|
|
# https://gerrit-review.googlesource.com/c/gerrit/+/298903
|
|
- name: Install python symlink
|
|
become: true
|
|
ansible.builtin.file:
|
|
src: /usr/bin/python3
|
|
dest: /usr/bin/python
|
|
state: link
|
|
|
|
- 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
|