summaryrefslogtreecommitdiff
path: root/per-service
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2016-11-08 14:05:15 +0000
committerBen Copeland <ben.copeland@linaro.org>2016-11-08 15:32:14 +0000
commit7477c28938de3782bee2187852120659bca4fc41 (patch)
treeebf15111fcbbed95e5d91e57684b4279e2b154cd /per-service
parent0fc28376152e21bec7d950063c9060019d97156f (diff)
downloadansible-playbooks-7477c28938de3782bee2187852120659bca4fc41.tar.gz
gerrit: Add ability to install plugins
Plugins can now be installed into gerrit via Ansible. It requires a user to upload the .jar file in following format {{url}}/{{gerrit_version}}/plugin.jar. When we upgrade versions of gerrit, the plugin.jar will get overwritten with the newer version. Change-Id: I682afc9981d5c83a72dde419be26ee52f9af8a37 Reviewed-on: https://review.linaro.org/15368 Reviewed-by: Andy Doan <andy.doan@linaro.org>
Diffstat (limited to 'per-service')
-rw-r--r--per-service/git-servers/group_vars/all2
-rw-r--r--per-service/git-servers/roles/gerrit-setup/tasks/gerrit.yml5
2 files changed, 7 insertions, 0 deletions
diff --git a/per-service/git-servers/group_vars/all b/per-service/git-servers/group_vars/all
index c68f9f6..296edc0 100644
--- a/per-service/git-servers/group_vars/all
+++ b/per-service/git-servers/group_vars/all
@@ -19,6 +19,8 @@ gitolite_admin_name: paul.sokolovsky
# localhost:6443).
www_host: "{{inventory_hostname}}"
+gerrit_plugin_url: http://people.linaro.org/~ben.copeland/gerrit
+gerrit_plugin_version: 2.13 # Adjust only major version, so 2.12, 2.13 etc.
gerrit_managed: no
gerrit_version: 2.13.2
gerrit_download_link: https://gerrit-releases.storage.googleapis.com/gerrit-{{gerrit_version}}.war
diff --git a/per-service/git-servers/roles/gerrit-setup/tasks/gerrit.yml b/per-service/git-servers/roles/gerrit-setup/tasks/gerrit.yml
index 8d7fd39..52bfffb 100644
--- a/per-service/git-servers/roles/gerrit-setup/tasks/gerrit.yml
+++ b/per-service/git-servers/roles/gerrit-setup/tasks/gerrit.yml
@@ -58,6 +58,11 @@
when: gerrit_index.stat.exists == False
command: chdir={{gerrit_root}} java -jar bin/gerrit.war reindex
+- name: Install Gerrit plugins
+ get_url: url={{gerrit_plugin_url}}/{{gerrit_plugin_version}}/{{item}} dest={{gerrit_root}}/plugins owner={{git_user}} group={{git_user}}
+ with_items:
+ - reviewers.jar
+
# NOTE: gerrit forks in wild ways that don't work with upstart
- name: Setup a Sys-V init script
template: src=gerrit.sysv dest=/etc/init.d/gerrit mode=0755