From f673eda5496f22a711471b78f8ca34e6696d091f Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 4 Oct 2021 17:00:24 +1100 Subject: [PATCH] gerrit: add its actions.config file This file used to be managed by puppet-gerrit and it seems we missed converting it to Ansible. Add it with the contents from the server. Change-Id: I10a10166446941d2676ae9181fc74b5a1408c5ed --- playbooks/roles/gerrit/files/its/actions.config | 12 ++++++++++++ playbooks/roles/gerrit/tasks/main.yaml | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 playbooks/roles/gerrit/files/its/actions.config diff --git a/playbooks/roles/gerrit/files/its/actions.config b/playbooks/roles/gerrit/files/its/actions.config new file mode 100644 index 0000000000..3c58ebd1e7 --- /dev/null +++ b/playbooks/roles/gerrit/files/its/actions.config @@ -0,0 +1,12 @@ +[rule "comment-on-status-update"] +action = add-standard-comment +event-type = patchset-created,change-abandoned,change-restored,change-merged +[rule "change_abandoned"] +action = set-status TODO +event-type = change-abandoned +[rule "change_in_progress"] +action = set-status REVIEW +event-type = patchset-created,change-restored +[rule "change_merged"] +action = set-status MERGED +event-type = change-merged diff --git a/playbooks/roles/gerrit/tasks/main.yaml b/playbooks/roles/gerrit/tasks/main.yaml index a95ee5f6f5..bea17596cd 100644 --- a/playbooks/roles/gerrit/tasks/main.yaml +++ b/playbooks/roles/gerrit/tasks/main.yaml @@ -55,6 +55,7 @@ - cache - db - etc + - etc/its - git - hooks - index @@ -206,6 +207,14 @@ - change-abandoned - patchset-created +- name: Write ITS plugin configuration file + copy: + src: its/actions.config + dest: '{{ gerrit_site_dir }}/etc/its/actions.config' + owner: '{{ gerrit_user_name }}' + group: '{{ gerrit_user_name }}' + mode: 0644 + - name: Write manage-projects script template: src: "manage-projects.j2"