gerrit-trigger: avoid exception spamming logs

Adds empty triggerInformationAction section which when
missing was generating recurring spam on Jenkins logs.

included null not assignable to interface hudson.model.Action

See https://issues.jenkins-ci.org/browse/JENKINS-45788

Change-Id: I97efbfcb17388b5ca99901aa35f4311c8db77710
This commit is contained in:
Sorin Sbarnea 2018-02-05 13:07:31 +00:00
parent 92fcbab123
commit ea324d31d2
12 changed files with 13 additions and 0 deletions

View File

@ -575,6 +575,8 @@ def gerrit(registry, xml_parent, data):
data.get('dynamic-trigger-enabled', False))
XML.SubElement(gtrig, 'triggerConfigURL').text = str(
data.get('dynamic-trigger-url', ''))
XML.SubElement(gtrig, 'triggerInformationAction').text = str(
data.get('trigger-information-action', ''))
XML.SubElement(gtrig, 'allowTriggeringUnreviewedPatches').text = str(
data.get('trigger-for-unreviewed-patches', False)).lower()
build_gerrit_triggers(gtrig, data)

View File

@ -74,6 +74,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
<triggerConfigURL/>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent/>

View File

@ -37,6 +37,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>

View File

@ -41,6 +41,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>

View File

@ -58,6 +58,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>

View File

@ -47,6 +47,7 @@
<notificationLevel>ALL</notificationLevel>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>true</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>

View File

@ -37,6 +37,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
<triggerConfigURL/>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>

View File

@ -37,6 +37,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent>

View File

@ -47,6 +47,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>true</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent/>

View File

@ -53,6 +53,7 @@
<notificationLevel>ALL</notificationLevel>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>true</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>

View File

@ -19,6 +19,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>True</dynamicTriggerConfiguration>
<triggerConfigURL>http://myhost/mytrigger</triggerConfigURL>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>

View File

@ -75,6 +75,7 @@
<notificationLevel/>
<dynamicTriggerConfiguration>False</dynamicTriggerConfiguration>
<triggerConfigURL/>
<triggerInformationAction/>
<allowTriggeringUnreviewedPatches>false</allowTriggeringUnreviewedPatches>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent/>