Update Gerrit Trigger Plugin Implementation

The changes between plugin version 2.30.0-2.32.0 have been
implemented. Current test cases are updated, and also new
test cases are added in order to verify old version XML
output has not been altered.

Documentation uses gerrit004.yaml as an exampple, therefore,
`build-cancellation-policy` have also been implemented to
show as example.

Signed-off-by: Eren Atas <eatas.contractor@libertyglobal.com>
Change-Id: I55fb6f8dd722d50cff369a6fba0e11c96b0c08aa
This commit is contained in:
Eren Atas 2021-02-01 14:18:30 +01:00
parent 15a0896791
commit 08678825a9
50 changed files with 448 additions and 7 deletions

View File

@ -145,7 +145,7 @@ def gerrit_handle_legacy_configuration(data):
)
def build_gerrit_triggers(xml_parent, data):
def build_gerrit_triggers(xml_parent, data, plugin_ver):
available_simple_triggers = {
"change-abandoned-event": "PluginChangeAbandonedEvent",
"change-merged-event": "PluginChangeMergedEvent",
@ -198,6 +198,15 @@ def build_gerrit_triggers(xml_parent, data):
("exclude-private", "excludePrivateState", False),
("exclude-wip", "excludeWipState", False),
]
if plugin_ver >= pkg_resources.parse_version("2.32.0"):
mapping.append(
(
"commit-message-contains-regex",
"commitMessageContainsRegEx",
"",
)
)
helpers.convert_mapping_to_xml(pc, pce, mapping, fail_required=True)
if "comment-added-event" in event.keys():
@ -225,13 +234,15 @@ def build_gerrit_triggers(xml_parent, data):
).text = comment_added_event["comment-contains-value"]
def build_gerrit_skip_votes(xml_parent, data):
def build_gerrit_skip_votes(xml_parent, data, plugin_ver):
outcomes = [
("successful", "onSuccessful"),
("failed", "onFailed"),
("unstable", "onUnstable"),
("notbuilt", "onNotBuilt"),
]
if plugin_ver >= pkg_resources.parse_version("2.32.0"):
outcomes.append(("aborted", "onAborted"))
skip_vote_node = XML.SubElement(xml_parent, "skipVote")
skip_vote = data.get("skip-vote", {})
@ -240,6 +251,26 @@ def build_gerrit_skip_votes(xml_parent, data):
XML.SubElement(skip_vote_node, tag_name).text = str(setting).lower()
def build_cancellation_policy(xml_parent, data, plugin_ver):
if plugin_ver >= pkg_resources.parse_version("2.32.0"):
options = [
("abort-new-patchsets", "abortNewPatchsets"),
("abort-manual-patchsets", "abortManualPatchsets"),
("abort-same-topic", "abortSameTopic"),
]
build_cancellation_policy_node = XML.SubElement(
xml_parent, "buildCancellationPolicy"
)
build_cancellation_policy_object = data.get("build-cancellation-policy", {})
XML.SubElement(build_cancellation_policy_node, "enabled").text = "true"
for tag, tag_name in options:
setting = build_cancellation_policy_object.get(tag, False)
XML.SubElement(build_cancellation_policy_node, tag_name).text = str(
setting
).lower()
def build_gerrit_parameter_modes(xml_parent, data, plugin_ver):
if plugin_ver < pkg_resources.parse_version("2.18.0"):
for parameter_name in (
@ -330,6 +361,9 @@ def gerrit(registry, xml_parent, data):
(default false)
* **exclude-wip** (`bool`) -- exclude wip change
(default false)
* **commit-message-contains-regex** (`str`) -- Commit message
contains regular expression. (default '')
Requires Gerrit Trigger Plugin >= 2.32.0
exclude-private|exclude-wip needs
Gerrit Trigger v2.29.0
@ -418,6 +452,8 @@ def gerrit(registry, xml_parent, data):
:arg int gerrit-build-unstable-verified-value: Unstable ''Verified'' value
:arg int gerrit-build-notbuilt-verified-value: Not built ''Verified''
value
:arg int gerrit-build-aborted-verified-value: Aborted ''Verified'' value
Requires Gerrit Trigger Plugin version >= 2.31.0
:arg int gerrit-build-started-codereview-value: Started ''CodeReview''
value
:arg int gerrit-build-successful-codereview-value: Successful
@ -427,10 +463,14 @@ def gerrit(registry, xml_parent, data):
value
:arg int gerrit-build-notbuilt-codereview-value: Not built ''CodeReview''
value
:arg int gerrit-build-aborted-codereview-value: Aborted ''CodeReview''
value
Requires Gerrit Trigger Plugin version >= 2.31.0
:arg str failure-message: Message to leave on failure (default '')
:arg str successful-message: Message to leave on success (default '')
:arg str unstable-message: Message to leave when unstable (default '')
:arg str notbuilt-message: Message to leave when not built (default '')
:arg str aborted-message: Message to leave when aborted (default '')
:arg str failure-message-file: Sets the filename within the workspace from
which to retrieve the unsuccessful review message. (optional)
:arg list projects: list of projects to match
@ -500,6 +540,7 @@ def gerrit(registry, xml_parent, data):
* **failed** (`bool`)
* **unstable** (`bool`)
* **notbuilt** (`bool`)
* **aborted** (`bool`) -- Requires Gerrit Trigger Plugin version >= 2.31.0
:arg bool silent: When silent mode is on there will be no communication
back to Gerrit, i.e. no build started/failed/successful approve
@ -511,6 +552,23 @@ def gerrit(registry, xml_parent, data):
to Gerrit. (default false)
:arg bool escape-quotes: escape quotes in the values of Gerrit change
parameters (default true)
:arg dict build-cancellation-policy: If used, rules regarding
cancellation of builds can be set with this option when
patchsets of the same change comes in. This setting overrides global
server configuration. If build-cancellation-policy is not present in
YAML the global server configuration is used.
Requires Gerrit Trigger Plugin version >= 2.32.0
:Options: * **abort-new-patchsets** (`bool`) -- Only running jobs
will be cancelled if a new patch version is pushed over
(default false).
* **abort-manual-patchsets** (`bool`) -- Builds triggered
manually will be aborted when a new patch set arrives
(default false).
* **abort-same-topic** (`bool`) -- Builds triggered with
topic will be aborted when a new patch set with the
same topic arrives (default false).
:arg bool no-name-and-email: Do not pass compound 'name and email'
parameters (default false)
@ -709,7 +767,9 @@ def gerrit(registry, xml_parent, data):
project.get("disable-strict-forbidden-file-verification", False)
).lower()
build_gerrit_skip_votes(gtrig, data)
build_gerrit_skip_votes(gtrig, data, plugin_ver)
if "build-cancellation-policy" in data:
build_cancellation_policy(gtrig, data, plugin_ver)
general_mappings = [
("silent", "silentMode", False),
("silent-start", "silentStartMode", False),
@ -750,10 +810,10 @@ def gerrit(registry, xml_parent, data):
"Gerrit Trigger property 'trigger-for-unreviewed-patches' is not "
"supported in this plugin version"
)
build_gerrit_triggers(gtrig, data)
build_gerrit_triggers(gtrig, data, plugin_ver)
override = str(data.get("override-votes", False)).lower()
if override == "true":
for yamlkey, xmlkey in [
votes = [
("gerrit-build-started-verified-value", "gerritBuildStartedVerifiedValue"),
(
"gerrit-build-successful-verified-value",
@ -788,7 +848,23 @@ def gerrit(registry, xml_parent, data):
"gerrit-build-notbuilt-codereview-value",
"gerritBuildNotBuiltCodeReviewValue",
),
]:
]
if plugin_ver >= pkg_resources.parse_version("2.31.0"):
votes.append(
(
"gerrit-build-aborted-verified-value",
"gerritBuildAbortedVerifiedValue",
)
)
votes.append(
(
"gerrit-build-aborted-codereview-value",
"gerritBuildAbortedCodeReviewValue",
)
)
for yamlkey, xmlkey in votes:
if data.get(yamlkey) is not None:
# str(int(x)) makes input values like '+1' work
XML.SubElement(gtrig, xmlkey).text = str(int(data.get(yamlkey)))
@ -802,6 +878,9 @@ def gerrit(registry, xml_parent, data):
("custom-url", "customUrl", ""),
("server-name", "serverName", "__ANY__"),
]
if plugin_ver >= pkg_resources.parse_version("2.31.0"):
message_mappings.append(("aborted-message", "buildAbortedMessage", ""))
helpers.convert_mapping_to_xml(gtrig, data, message_mappings, fail_required=True)

View File

@ -74,6 +74,11 @@
"trigger-on-ref-updated-event": false,
"trigger-on-comment-added-event": false,
"override-votes": true,
"build-cancellation-policy": {
"abort-new-patchsets": true,
"abort-manual-patchsets": false,
"abort-same-topic": true
},
"gerrit-build-started-verified-value": 0,
"gerrit-build-successful-verified-value": 1,
"gerrit-build-failed-verified-value": -1,
@ -84,6 +89,8 @@
"gerrit-build-failed-codereview-value": -1,
"gerrit-build-unstable-codereview-value": -1,
"gerrit-build-notbuilt-codereview-value": -1,
"gerrit-build-aborted-verified-value": 0,
"gerrit-build-aborted-codereview-value": 0,
"projects": [
{
"project-compare-type": "PLAIN",
@ -100,7 +107,8 @@
"failure-message": "Failed message.",
"successful-message": "Success message.",
"unstable-message": "Unstable message.",
"notbuilt-message": "Not built message."
"notbuilt-message": "Not built message.",
"aborted-message": "Aborted message."
}
}
]

View File

@ -65,7 +65,14 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<buildCancellationPolicy>
<enabled>true</enabled>
<abortNewPatchsets>true</abortNewPatchsets>
<abortManualPatchsets>false</abortManualPatchsets>
<abortSameTopic>true</abortSameTopic>
</buildCancellationPolicy>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
@ -92,6 +99,8 @@
<gerritBuildFailedCodeReviewValue>-1</gerritBuildFailedCodeReviewValue>
<gerritBuildUnstableCodeReviewValue>-1</gerritBuildUnstableCodeReviewValue>
<gerritBuildNotBuiltCodeReviewValue>-1</gerritBuildNotBuiltCodeReviewValue>
<gerritBuildAbortedVerifiedValue>0</gerritBuildAbortedVerifiedValue>
<gerritBuildAbortedCodeReviewValue>0</gerritBuildAbortedCodeReviewValue>
<buildStartMessage>Start message.</buildStartMessage>
<buildFailureMessage>Failed message.</buildFailureMessage>
<buildSuccessfulMessage>Success message.</buildSuccessfulMessage>
@ -100,6 +109,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage>Aborted message.</buildAbortedMessage>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
<builders>

View File

@ -27,6 +27,7 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>true</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -54,6 +55,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -16,6 +16,7 @@ triggers:
failed: true
unstable: true
notbuilt: true
aborted: true
silent: false
escape-quotes: false
no-name-and-email: false

View File

@ -31,6 +31,7 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -58,6 +59,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -48,6 +48,7 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>true</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -75,6 +76,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -26,6 +26,7 @@ triggers:
failed: true
unstable: true
notbuilt: true
aborted: true
silent: false
escape-quotes: false
no-name-and-email: false

View File

@ -37,7 +37,14 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>true</onAborted>
</skipVote>
<buildCancellationPolicy>
<enabled>true</enabled>
<abortNewPatchsets>false</abortNewPatchsets>
<abortManualPatchsets>true</abortManualPatchsets>
<abortSameTopic>true</abortSameTopic>
</buildCancellationPolicy>
<silentMode>false</silentMode>
<silentStartMode>true</silentStartMode>
<escapeQuotes>false</escapeQuotes>
@ -57,6 +64,7 @@
<excludeNoCodeChange>true</excludeNoCodeChange>
<excludePrivateState>true</excludePrivateState>
<excludeWipState>true</excludeWipState>
<commitMessageContainsRegEx>regex</commitMessageContainsRegEx>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
<verdictCategory>APRV</verdictCategory>
@ -71,6 +79,7 @@
<buildUnsuccessfulFilepath>path/to/filename</buildUnsuccessfulFilepath>
<customUrl/>
<serverName>my-server</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -7,6 +7,7 @@ triggers:
exclude-no-code-change: true
exclude-private: true
exclude-wip: true
commit-message-contains-regex: "regex"
- comment-added-event:
approval-category: 'APRV'
approval-value: 1
@ -29,6 +30,11 @@ triggers:
failed: true
unstable: true
notbuilt: true
aborted: true
build-cancellation-policy:
abort-new-patchsets: false
abort-manual-patchsets: true
abort-same-topic: true
silent: false
silent-start: true
escape-quotes: false

View File

@ -27,6 +27,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -56,6 +57,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -27,6 +27,7 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>true</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -53,6 +54,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -16,6 +16,7 @@ triggers:
failed: true
unstable: true
notbuilt: true
aborted: true
silent: false
escape-quotes: false
no-name-and-email: false

View File

@ -37,6 +37,7 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>true</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -65,6 +66,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>my-server</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -24,6 +24,7 @@ triggers:
failed: true
unstable: true
notbuilt: true
aborted: true
silent: false
escape-quotes: false
no-name-and-email: false

View File

@ -43,6 +43,7 @@
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
<onAborted>true</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>true</silentStartMode>
@ -63,6 +64,7 @@
<excludeNoCodeChange>true</excludeNoCodeChange>
<excludePrivateState>true</excludePrivateState>
<excludeWipState>true</excludeWipState>
<commitMessageContainsRegEx>regex</commitMessageContainsRegEx>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedEvent>
<verdictCategory>APRV</verdictCategory>
@ -77,6 +79,7 @@
<buildUnsuccessfulFilepath>path/to/filename</buildUnsuccessfulFilepath>
<customUrl/>
<serverName>my-server</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -7,6 +7,7 @@ triggers:
exclude-no-code-change: true
exclude-private: true
exclude-wip: true
commit-message-contains-regex: regex
- comment-added-event:
approval-category: 'APRV'
approval-value: 1
@ -32,6 +33,7 @@ triggers:
failed: true
unstable: true
notbuilt: true
aborted: true
silent: false
silent-start: true
escape-quotes: false

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -37,6 +38,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -27,6 +27,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -54,6 +55,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -32,6 +33,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -9,6 +9,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -45,6 +46,7 @@
<excludeNoCodeChange>true</excludeNoCodeChange>
<excludePrivateState>false</excludePrivateState>
<excludeWipState>true</excludeWipState>
<commitMessageContainsRegEx>regex</commitMessageContainsRegEx>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPrivateStateChangedEvent/>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginRefUpdatedEvent/>
@ -59,6 +61,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -19,6 +19,7 @@ triggers:
exclude-private: false
exclude-trivial-rebase: false
exclude-wip: true
commit-message-contains-regex: regex
- private-state-changed-event
- ref-updated-event
- topic-changed-event

View File

@ -0,0 +1,3 @@
- longName: 'Gerrit Trigger'
shortName: 'gerrit-trigger'
version: '2.20.0'

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
<spec/>
<gerritProjects/>
<skipVote>
<onSuccessful>true</onSuccessful>
<onFailed>true</onFailed>
<onUnstable>true</onUnstable>
<onNotBuilt>true</onNotBuilt>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
<dependencyJobsNames/>
<commitMessageParameterMode>BASE64</commitMessageParameterMode>
<nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode>
<changeSubjectParameterMode>PLAIN</changeSubjectParameterMode>
<commentTextParameterMode>BASE64</commentTextParameterMode>
<notificationLevel/>
<dynamicTriggerConfiguration>false</dynamicTriggerConfiguration>
<triggerConfigURL/>
<dynamicGerritProjects class="empty-list"/>
<triggerInformationAction/>
<triggerOnEvents/>
<buildStartMessage/>
<buildFailureMessage/>
<buildSuccessfulMessage/>
<buildUnstableMessage/>
<buildNotBuiltMessage/>
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -0,0 +1,7 @@
triggers:
- gerrit:
skip-vote:
successful: true
failed: true
unstable: true
notbuilt: true

View File

@ -0,0 +1,3 @@
- longName: 'Gerrit Trigger'
shortName: 'gerrit-trigger'
version: '2.20.0'

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
<spec/>
<gerritProjects/>
<skipVote>
<onSuccessful>false</onSuccessful>
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
<dependencyJobsNames/>
<commitMessageParameterMode>BASE64</commitMessageParameterMode>
<nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode>
<changeSubjectParameterMode>PLAIN</changeSubjectParameterMode>
<commentTextParameterMode>BASE64</commentTextParameterMode>
<notificationLevel/>
<dynamicTriggerConfiguration>false</dynamicTriggerConfiguration>
<triggerConfigURL/>
<dynamicGerritProjects class="empty-list"/>
<triggerInformationAction/>
<triggerOnEvents/>
<gerritBuildStartedVerifiedValue>0</gerritBuildStartedVerifiedValue>
<gerritBuildSuccessfulVerifiedValue>1</gerritBuildSuccessfulVerifiedValue>
<gerritBuildFailedVerifiedValue>-1</gerritBuildFailedVerifiedValue>
<gerritBuildUnstableVerifiedValue>-1</gerritBuildUnstableVerifiedValue>
<gerritBuildNotBuiltVerifiedValue>-1</gerritBuildNotBuiltVerifiedValue>
<gerritBuildStartedCodeReviewValue>0</gerritBuildStartedCodeReviewValue>
<gerritBuildSuccessfulCodeReviewValue>1</gerritBuildSuccessfulCodeReviewValue>
<gerritBuildFailedCodeReviewValue>-1</gerritBuildFailedCodeReviewValue>
<gerritBuildUnstableCodeReviewValue>-1</gerritBuildUnstableCodeReviewValue>
<gerritBuildNotBuiltCodeReviewValue>-1</gerritBuildNotBuiltCodeReviewValue>
<buildStartMessage/>
<buildFailureMessage/>
<buildSuccessfulMessage/>
<buildUnstableMessage/>
<buildNotBuiltMessage/>
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -0,0 +1,13 @@
triggers:
- gerrit:
override-votes: true
gerrit-build-started-verified-value: 0
gerrit-build-successful-verified-value: 1
gerrit-build-failed-verified-value: -1
gerrit-build-unstable-verified-value: -1
gerrit-build-notbuilt-verified-value: -1
gerrit-build-started-codereview-value: 0
gerrit-build-successful-codereview-value: 1
gerrit-build-failed-codereview-value: -1
gerrit-build-unstable-codereview-value: -1
gerrit-build-notbuilt-codereview-value: -1

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
<spec/>
<gerritProjects/>
<skipVote>
<onSuccessful>false</onSuccessful>
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<buildCancellationPolicy>
<enabled>true</enabled>
<abortNewPatchsets>false</abortNewPatchsets>
<abortManualPatchsets>true</abortManualPatchsets>
<abortSameTopic>true</abortSameTopic>
</buildCancellationPolicy>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
<dependencyJobsNames/>
<commitMessageParameterMode>BASE64</commitMessageParameterMode>
<nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode>
<changeSubjectParameterMode>PLAIN</changeSubjectParameterMode>
<commentTextParameterMode>BASE64</commentTextParameterMode>
<notificationLevel/>
<dynamicTriggerConfiguration>false</dynamicTriggerConfiguration>
<triggerConfigURL/>
<dynamicGerritProjects class="empty-list"/>
<triggerInformationAction/>
<triggerOnEvents/>
<buildStartMessage/>
<buildFailureMessage/>
<buildSuccessfulMessage/>
<buildUnstableMessage/>
<buildNotBuiltMessage/>
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -0,0 +1,6 @@
triggers:
- gerrit:
build-cancellation-policy:
abort-new-patchsets: false
abort-manual-patchsets: true
abort-same-topic: true

View File

@ -0,0 +1,3 @@
- longName: 'Gerrit Trigger'
shortName: 'gerrit-trigger'
version: '2.20.0'

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
<spec/>
<gerritProjects/>
<skipVote>
<onSuccessful>false</onSuccessful>
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
<dependencyJobsNames/>
<commitMessageParameterMode>BASE64</commitMessageParameterMode>
<nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode>
<changeSubjectParameterMode>PLAIN</changeSubjectParameterMode>
<commentTextParameterMode>BASE64</commentTextParameterMode>
<notificationLevel/>
<dynamicTriggerConfiguration>false</dynamicTriggerConfiguration>
<triggerConfigURL/>
<dynamicGerritProjects class="empty-list"/>
<triggerInformationAction/>
<triggerOnEvents/>
<buildStartMessage>Start message.</buildStartMessage>
<buildFailureMessage>Failed message.</buildFailureMessage>
<buildSuccessfulMessage>Success message.</buildSuccessfulMessage>
<buildUnstableMessage>Unstable message.</buildUnstableMessage>
<buildNotBuiltMessage>Not built message.</buildNotBuiltMessage>
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -0,0 +1,7 @@
triggers:
- gerrit:
start-message: 'Start message.'
failure-message: 'Failed message.'
successful-message: 'Success message.'
unstable-message: 'Unstable message.'
notbuilt-message: 'Not built message.'

View File

@ -0,0 +1,3 @@
- longName: 'Gerrit Trigger'
shortName: 'gerrit-trigger'
version: '2.20.0'

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
<spec/>
<gerritProjects/>
<skipVote>
<onSuccessful>false</onSuccessful>
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
<escapeQuotes>true</escapeQuotes>
<dependencyJobsNames/>
<commitMessageParameterMode>BASE64</commitMessageParameterMode>
<nameAndEmailParameterMode>PLAIN</nameAndEmailParameterMode>
<changeSubjectParameterMode>PLAIN</changeSubjectParameterMode>
<commentTextParameterMode>BASE64</commentTextParameterMode>
<notificationLevel/>
<dynamicTriggerConfiguration>false</dynamicTriggerConfiguration>
<triggerConfigURL/>
<dynamicGerritProjects class="empty-list"/>
<triggerInformationAction/>
<triggerOnEvents>
<com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
<excludeDrafts>true</excludeDrafts>
<excludeTrivialRebase>true</excludeTrivialRebase>
<excludeNoCodeChange>true</excludeNoCodeChange>
<excludePrivateState>true</excludePrivateState>
<excludeWipState>true</excludeWipState>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent>
</triggerOnEvents>
<buildStartMessage/>
<buildFailureMessage/>
<buildSuccessfulMessage/>
<buildUnstableMessage/>
<buildNotBuiltMessage/>
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
</project>

View File

@ -0,0 +1,9 @@
triggers:
- gerrit:
trigger-on:
- patchset-created-event:
exclude-drafts: true
exclude-trivial-rebase: true
exclude-no-code-change: true
exclude-private: true
exclude-wip: true

View File

@ -66,6 +66,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -93,6 +94,8 @@
<gerritBuildFailedCodeReviewValue>-1</gerritBuildFailedCodeReviewValue>
<gerritBuildUnstableCodeReviewValue>-1</gerritBuildUnstableCodeReviewValue>
<gerritBuildNotBuiltCodeReviewValue>-1</gerritBuildNotBuiltCodeReviewValue>
<gerritBuildAbortedVerifiedValue>0</gerritBuildAbortedVerifiedValue>
<gerritBuildAbortedCodeReviewValue>0</gerritBuildAbortedCodeReviewValue>
<buildStartMessage>Start message.</buildStartMessage>
<buildFailureMessage>Failed message.</buildFailureMessage>
<buildSuccessfulMessage>Success message.</buildSuccessfulMessage>
@ -101,6 +104,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage>Aborted message.</buildAbortedMessage>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
<builders>

View File

@ -59,6 +59,8 @@
gerrit-build-failed-codereview-value: -1
gerrit-build-unstable-codereview-value: -1
gerrit-build-notbuilt-codereview-value: -1
gerrit-build-aborted-verified-value: 0
gerrit-build-aborted-codereview-value: 0
projects:
- project-compare-type: 'PLAIN'
project-pattern: '{project_pattern}'
@ -70,6 +72,7 @@
successful-message: 'Success message.'
unstable-message: 'Unstable message.'
notbuilt-message: 'Not built message.'
aborted-message: 'Aborted message.'
- scm:
name: gerrit-scm

View File

@ -41,6 +41,7 @@
<onFailed>false</onFailed>
<onUnstable>false</onUnstable>
<onNotBuilt>false</onNotBuilt>
<onAborted>false</onAborted>
</skipVote>
<silentMode>false</silentMode>
<silentStartMode>false</silentStartMode>
@ -64,6 +65,7 @@
<buildUnsuccessfulFilepath/>
<customUrl/>
<serverName>__ANY__</serverName>
<buildAbortedMessage/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
</triggers>
<builders/>