summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2018-11-15 09:12:53 -0600
committerKelley Spoon <kelley.spoon@linaro.org>2019-01-11 19:05:52 +0000
commit79cd99cdcdedb166e4df21122d9aa1fc858d92fd (patch)
tree25abf5596811b8a77f2a843eaa089eb5e052f8e5
parent363e55a62ea36d9c2a6387a83824c6f424737dc9 (diff)
Gerrit: update gerrit to install avatars-external and config for mlp.o
As per LSS-259, mlplatform.org has requested the avatars-external plugin be installed. The plugin requires configuration in gerrit.config in order to be enabled, so let's update that as well. Change-Id: I7610de59c53833b0bdff6c293855cd7621e94200 Reviewed-on: https://review.linaro.org/29084 Reviewed-by: Benjamin Copeland <ben.copeland@linaro.org>
-rw-r--r--files/gerrit/review.mlplatform.org12
-rw-r--r--host_vars/review.mlplatform.org1
-rw-r--r--roles/gerrit/tasks/gerrit.yml10
3 files changed, 23 insertions, 0 deletions
diff --git a/files/gerrit/review.mlplatform.org b/files/gerrit/review.mlplatform.org
index cc49eafd..793ff841 100644
--- a/files/gerrit/review.mlplatform.org
+++ b/files/gerrit/review.mlplatform.org
@@ -70,3 +70,15 @@
[plugin "gerrit-oauth-provider-github-oauth"]
client-id = c9573d41459955d81f3a
fix-legacy-user-id = false
+[plugin "gerrit-oauth-provider-github-oauth"]
+ client-id = c9573d41459955d81f3a
+ fix-legacy-user-id = false
+[plugin "gerrit-oauth-provider-google-oauth"]
+ fix-legacy-user-id = false
+[plugin "gerrit-oauth-provider-bitbucket-oauth"]
+ fix-legacy-user-id = false
+[plugin "gerrit-oauth-provider-cas-oauth"]
+ fix-legacy-user-id = false
+[plugin "avatars-external"]
+ url = https://github.com/${user}.png
+ changeUrl = https://github.com/settings/profile
diff --git a/host_vars/review.mlplatform.org b/host_vars/review.mlplatform.org
index 6c57010d..a604ffee 100644
--- a/host_vars/review.mlplatform.org
+++ b/host_vars/review.mlplatform.org
@@ -7,6 +7,7 @@ host_site_name: ARM ML Code Review
gerrit_managed: yes
gerrit_oauth: yes
+gerrit_avatars: yes
certbot_domains: ["review.mlplatform.org","git.mlplatform.org"]
certbot_host_domain: review.mlplatform.org
diff --git a/roles/gerrit/tasks/gerrit.yml b/roles/gerrit/tasks/gerrit.yml
index 3897f0f3..04d979af 100644
--- a/roles/gerrit/tasks/gerrit.yml
+++ b/roles/gerrit/tasks/gerrit.yml
@@ -44,6 +44,16 @@
force: yes
when: gerrit_oauth is defined
+- name: Download avatars-external plugin
+ get_url:
+ url: https://gerrit-ci.gerritforge.com/view/Plugins-stable-{{gerrit_plugin_version}}/job/plugin-avatars-external-bazel-stable-{{gerrit_plugin_version}}/lastSuccessfulBuild/artifact/bazel-genfiles/plugins/avatars-external/avatars-external.jar
+ dest: "{{gerrit_root}}/plugins/avatars-external.jar"
+ owner: "{{git_user}}"
+ group: "{{git_user}}"
+ validate_certs: no
+ force: yes
+ when: gerrit_avatars is defined
+
- name: Create Gerrit.conf
template: src="files/gerrit/{{gerrit_host}}" dest={{gerrit_root}}/etc/gerrit.config owner={{git_user}} group={{git_user}}
backup=yes