system-config/modules/openstack_project/templates/gerrit_patchset-created.erb
Jeremy Stanley 926a4d1f6c Update patchset-created hook for Gerrit welcome
* .../templates/gerrit_patchset-created.erb: The SSH user and key
for the welcome-message hook script are now options instead of
positional parameters. Also, the user is a short name not a full
E-mail address.

Change-Id: Ibcb70068db89ec75a4b284340206718fd9d10e96
2014-03-18 02:32:08 +00:00

19 lines
833 B
Plaintext
Executable File

#!/bin/sh
# Use timeout to kill any process running longer than 10 minutes.
timeout -k 2m 10m /usr/local/bin/update-blueprint patchset-created "$@"
timeout -k 2m 10m /usr/local/bin/update-bug patchset-created "$@"
timeout -k 2m 10m /usr/local/bin/notify-impact patchset-created "$@" --impact SecurityImpact --dest-address 'openstack-security@lists.openstack.org'
<% if trivial_rebase_role_id -%>
timeout -k 2m 10m /usr/local/bin/trivial-rebase \
patchset-created \
--whitespace \
--private-key-path=<%= ssh_host_key %> \
--role-user=<%= trivial_rebase_role_id %> "$@"
<% end -%>
<% if $ssh_welcome_rsa_key_contents != "" -%>
timeout -k 2m 10m /usr/local/bin/welcome-message patchset-created \
--verbose --ssh-user=welcome-message \
--ssh-key=/home/gerrit2/review_site/etc/ssh_welcome_rsa_key "$@"
<% end -%>