Merge "publishers: add "threshold" support to join-trigger"
This commit is contained in:
commit
4968b81b61
@ -3496,6 +3496,8 @@ def join_trigger(registry, xml_parent, data):
|
||||
:arg list projects: list of projects to trigger
|
||||
:arg list publishers: list of triggers from publishers module that
|
||||
defines projects that need to be triggered
|
||||
:arg str threshold: result threshold to trigger jobs (optional).
|
||||
Valid values are "success", "unstable", "failure", and "aborted".
|
||||
:arg bool even-if-unstable: if true jobs will trigger even if some
|
||||
downstream jobs are marked as unstable (default false) (DEPRECATED)
|
||||
|
||||
@ -3519,6 +3521,10 @@ def join_trigger(registry, xml_parent, data):
|
||||
if unstable:
|
||||
XML.SubElement(jointrigger, "evenIfDownstreamUnstable").text = unstable
|
||||
|
||||
threshold = data.get("threshold", "")
|
||||
if threshold:
|
||||
helpers.trigger_threshold(jointrigger, "resultThreshold", threshold)
|
||||
|
||||
|
||||
def jabber(registry, xml_parent, data):
|
||||
"""yaml: jabber
|
||||
|
22
tests/publishers/fixtures/join-trigger002.xml
Normal file
22
tests/publishers/fixtures/join-trigger002.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<publishers>
|
||||
<hudson.tasks.BuildTrigger>
|
||||
<childProjects>project-1,project-2</childProjects>
|
||||
<threshold>
|
||||
<name>FAILURE</name>
|
||||
<ordinal>2</ordinal>
|
||||
<color>RED</color>
|
||||
</threshold>
|
||||
</hudson.tasks.BuildTrigger>
|
||||
<join.JoinTrigger>
|
||||
<joinProjects>cleanup</joinProjects>
|
||||
<joinPublishers/>
|
||||
<resultThreshold>
|
||||
<name>FAILURE</name>
|
||||
<ordinal>2</ordinal>
|
||||
<color>RED</color>
|
||||
</resultThreshold>
|
||||
</join.JoinTrigger>
|
||||
</publishers>
|
||||
</project>
|
8
tests/publishers/fixtures/join-trigger002.yaml
Normal file
8
tests/publishers/fixtures/join-trigger002.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
publishers:
|
||||
- trigger:
|
||||
project: project-1,project-2
|
||||
threshold: failure
|
||||
- join-trigger:
|
||||
projects:
|
||||
- cleanup
|
||||
threshold: failure
|
Loading…
x
Reference in New Issue
Block a user