From 3b0ff58b276f22fe34c4d38177667cf09ff14f54 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Thu, 15 May 2014 18:32:50 +0000 Subject: [PATCH] Add change-abandoned hook for gerrit in puppet Gerrit manifest for review servers was lacking the change-abandoned hook, even though jeepyb had already support for notifying LP bug when the linked review was being abandoned. This change adds the missing hook to the gerrit manifest as a file resource. Closes-Bug: 1319305 Change-Id: I07555bfbfe255239ab1aeaa5d14bcfa807005faf --- .../openstack_project/files/gerrit/change-abandoned | 4 ++++ modules/openstack_project/manifests/gerrit.pp | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100755 modules/openstack_project/files/gerrit/change-abandoned diff --git a/modules/openstack_project/files/gerrit/change-abandoned b/modules/openstack_project/files/gerrit/change-abandoned new file mode 100755 index 0000000000..5761951eca --- /dev/null +++ b/modules/openstack_project/files/gerrit/change-abandoned @@ -0,0 +1,4 @@ +#!/bin/sh + +# Use timeout to kill any process running longer than 10 minutes. +timeout -k 2m 10m /usr/local/bin/update-bug change-abandoned "$@" diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index 48848abd94..945b9d28e9 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -295,6 +295,16 @@ class openstack_project::gerrit ( require => Class['::gerrit'], } + file { '/home/gerrit2/review_site/hooks/change-abandoned': + ensure => present, + owner => 'root', + group => 'root', + mode => '0555', + source => 'puppet:///modules/openstack_project/gerrit/change-abandoned', + replace => true, + require => Class['::gerrit'], + } + file { '/home/gerrit2/review_site/hooks/notify_impact.yaml': ensure => present, source =>